Hi tubbo, the first method is correct, the second isn't.
I tried exactly that url (with my login and api key) and it worked fine.
here is the output i get:
curl -v '
http://api.bit.ly/shorten?version=2.0.1&longUrl=http://psychedeli.ca/blog/posts/1&login=j3h14h&apiKey={{apikey}}'
* About to connect() to
api.bit.ly port 80 (#0)
* Trying 168.143.174.25... connected
* Connected to
api.bit.ly (168.143.174.25) port 80 (#0)
> GET /shorten?version=2.0.1&longUrl=
http://psychedeli.ca/blog/posts/1&login=j3h14h&apiKey={{apikey}} HTTP/1.1
> User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8k zlib/1.2.3
> Host:
api.bit.ly
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx/0.7.42
< Date: Thu, 26 Nov 2009 03:31:58 GMT
< Content-Type: text/html;charset=utf-8
< Connection: keep-alive
< Content-Length: 303
< Allow: GET, HEAD, POST
< Set-Cookie: anonu=psu__071b79af-5868-4fb3-9eb8-257efae46918---f8ed2a34a39863e7fb88d5a2520b4288;
Domain=.
bit.ly; expires=Wed, 26-Oct-2011 22:31:58 GMT; Path=/;
Version=1
< Set-Cookie: bsession=60246b63-1f2a-483e-b047-c26cfd150703---56732534f10baa01bc4a7eb59e96bb16;
Domain=.
bit.ly; expires=Wed, 26-Oct-2011 22:31:58 GMT; Path=/;
Version=1
<
{
"errorCode": 0,
"errorMessage": "",
"results": {
"
http://psychedeli.ca/blog/posts/1": {
"hash": "6DTVSa",
"shortKeywordUrl": "",
"shortUrl": "
http://bit.ly/6Z7hqy",
"userHash": "6Z7hqy"
}
},
"statusCode": "OK"
* Connection #0 to host
api.bit.ly left intact
* Closing connection #0
}
---
so, can you email a full -v trace to
sup...@bit.ly so we can
troubleshoot further?
you can also double-check your api key here
http://bit.ly/account/your_api_key
also, you should encode the individual components of your api call, so
the longUrl should really be
http%3A%2F%2Fpsychedeli.ca%2Fblog%2Fposts%2F1
--
Jehiah
> --
>
> You received this message because you are subscribed to the Google Groups "bitly API" group.
> To post to this group, send email to
bitl...@googlegroups.com.
> To unsubscribe from this group, send email to
bitly-api+...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/bitly-api?hl=en.
>
>
>