当前位置: 动力学知识库 > 问答 > 编程问答 >

post - Authorized used of goo.gl API to add URLs to user history

问题描述:

With Google opening the goo.gl API a few weeks ago, it's quite easy to use it with POST:

curl -F "url=LONGURL" http://goo.gl/api/shorten

The response is like this:

{"short_url":"http://goo.gl/A9MR","added_to_history":false}

So, does anyone know how to perform an authorized POST to the goo.gl API so that the shortened URL is added to the users history as if you would use the browser?

I tried providing a basic Authorization header using my Google mail address and password, but that doesn't work.

网友答案:

It's not really a public API, yet. What you're using is what the goo.gl site uses itself, but it's not designed for public use like you're trying to do. They do plan on launching one though, and when they do I'm sure they'll add it as an option.

See this post

EDIT: This is now possible with the newly launched API. See the docs here.

分享给朋友:
您可能感兴趣的文章:
随机阅读: