gcode-mirror / bitly-api

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

/lookup for a url shorten with custom short domain is returning bit.ly short url #47

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem (provide an exact http api call 
whereappropriate)?
1. /shorten a long url using custom short domain
http://api.bitly.com/v3/shorten?login=MY_LOGIN&apiKey=MY_API_KEY&longUrl=http%3A
%2F%2Fwww.example-of-unique-link.com%2F&format=json
{ "status_code": 200, "status_txt": "OK", "data": { "long_url": 
"http:\/\/www.example-of-unique-link.com\/", "url": 
"http:\/\/my.own-doma.in\/5Lu6", "hash": "5Lu6", "global_hash": "b1tL33", 
"new_hash": 1 } }

2. /lookup for this long url
http://api.bitly.com/v3/lookup?login=MY_LOGIN&apiKey=MY_API_KEY&url=http%3A%2F%2
Fwww.example-of-unique-link.com%2F&format=json
{"status_code": 200, "data": {"lookup": [{"url": 
"http://www.example-of-unique-link.com/", "short_url": "http://bit.ly/b1tL33", 
"global_hash": "b1tL33"}]}, "status_txt": "OK"}

What is the expected output? What do you see instead?
expected:
{"status_code": 200, "data": {"lookup": [{"url": 
"http://www.example-of-unique-link.com/", "short_url": 
"http://my.own-doma.in/5Lu6", "global_hash": "b1tL33"}]}, "status_txt": "OK"}

instead:
{"status_code": 200, "data": {"lookup": [{"url": 
"http://www.example-of-unique-link.com/", "short_url": "http://bit.ly/b1tL33", 
"global_hash": "b1tL33"}]}, "status_txt": "OK"}

What version of the product are you using? On what operating system?
v3 on curl/mac

Please provide any additional information below.
Since a long url was shorten using my api key and login which has custom short 
domain set up, it was expected to retrieve (/lookup) the same short url with my 
custom short domain and not the bit.ly one.
I don't want to use /shorten again since the idea is to just check if a long 
url already exists shorten with my own custom short domain.

Original issue reported on code.google.com by marceldu...@gmail.com on 10 Aug 2011 at 9:21

GoogleCodeExporter commented 9 years ago
Same for me: I would like to avoid doing a /shorten repeatedly for the same url 
(to avoid rate limitations and reduce query time thanks to polling several 
URLs). But if I get the bitly short url instead of the one with my own domain, 
it's no use...

Original comment by eprouv...@gmail.com on 26 Nov 2011 at 5:40

GoogleCodeExporter commented 9 years ago
I also have this problem. Is there at least a work around?

Original comment by sc...@scottsinclair.me on 22 Feb 2012 at 1:15