Avnish1985 / bitly-api

Automatically exported from code.google.com/p/bitly-api
0 stars 0 forks source link

lookup returns NOT_FOUND but online (from bitly site) returns short url #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am trying the look up api method... 
Please see below the request and response received. The same url when submitted 
on the bitly site returns the short url. Also sometimes resetting the api  key 
works... 

http://api.bit.ly/v3/lookup?url=http%3A%2F%2Fwww.twitter.com%2F26163249961&login
={LOGIN}&apiKey=R_542b81748f130c2487f10380560cd90c&format=json

The lookup response is:
{"status_code": 200, "data": {"lookup": [{"url": 
"http://www.twitter.com/26163249961", "error": "NOT_FOUND"}]}, "status_txt": 
"OK"}

Kindly also tell if there are any usage limits such as calls per day etc

Original issue reported on code.google.com by jadhavsh...@gmail.com on 20 Oct 2010 at 12:09

GoogleCodeExporter commented 8 years ago
per api documentation (api.bit.ly) there are API limits on all endpoints, but 
you should not hit those limits via normal usage.

/v3/lookup may or may not return a short link depending on weather or not 
bit.ly has seen that long link before. it is used for getting a bit.ly 
identifier so that you can query stats about a link. If you are sharing a link 
you should use /v3/shorten which will always return a unique shortUrl for your 
account which you can use for sharing and tracking metrics.

Original comment by jehiah on 16 Nov 2010 at 3:44