bit ly callback invalid code

154 views
Skip to first unread message

workme...@gmail.com

unread,
Dec 14, 2017, 12:29:00 PM12/14/17
to Bitly API
Hi team when i request access  token from callback CODE it throw me this error {"status_code": 401, "data": null, "status_txt": "INVALID_CODE"} from link like this http://localhost/app/shortlink/bitly/oauth2callback?code=80f30d760d79e2c319455d075f5b13b3fe13274b
what wrong :'( ?

Peter Herndon

unread,
Dec 14, 2017, 1:06:49 PM12/14/17
to Bitly API
Hi there,

Can you describe what you are trying to accomplish, and show the exact URLs you are calling? For normal integration you may not need to go through the full OAuth web flow. Instead, if all you need is for your program to call our API and use a single login, just use the generic access token. Generate it at https://bitly.com/a/oauth_apps, store it in a config file or hard-code it, and don't worry about dynamic OAuth authentication. The only reason you would need to implement the OAuth web flow is if you intend your application to be used by folks who each have their own Bitly account. If that _is_ your use case, then we'll need to see the details of the OAuth web flow endpoints you are calling. Perhaps at that point, we should move to a private email conversation at a...@bitly.com in order to avoid exposing your security details on the public internet.

Regards,

---Peter
Peter Herndon
Sr. Backend Engineer
@Bitly
Reply all
Reply to author
Forward
0 new messages