Hot answers tagged

5

Refer to the Stack Exchange API, Authentication docs. It looks like you are trying to authenticate using either a server you do not control, or a local server that is not on the public internet. Crucial Points: Do not specify a redirect_uri to any server that you do not control!!! When you use something like redirect_uri=https://www.yahoo.com/, then a ...


4

Your second call must be https:. You actually got an error like: "error_id":406, "error_message":"Access token sent over non-HTTPS request, it has been invalidated", "error_name":"access_token_compromised" On the first attempt. Only subsequent attempts, with the same token, would yield the 'key' is not valid for passed 'access_token' error. When ...


3

So, this was a fun one. :) We apparently broke several different things over the course of a year that went unnoticed until Google turned off OpenID support. In no particular order but for fun and posterity: Facebook OAuth authentication just straight up didn't work. It broke back in January of 2014 when the code was accidentally changed from function ...


2

Yes, calls to /access-tokens/{accessTokens} use API quota. You can see that by repeatedly running /2.2/access-tokens/XBWL0stf*YIOCl7WpJHqYA)) for example. With each call, the quota_remaining value will decrease. However, there is no reason that the token check has to use the same key as your main app. The token check and your main app would then use ...


2

The authentication process is described in the API docs: http://api.stackexchange.com/docs/authentication.


1

Yes, each time you invoke stackexchange.com/oauth/ you will get a fresh access token, even though old ones may still be valid. For example: Go to /me/inboxLivedoc and hit Get Token twice, recording the token value each time (It will always be different). Then go to /access-tokens/{accessTokens}Livedoc and check each token. They will both still be valid! ...


1

Refer to the generic URI syntax, it is perfectly valid to have a fragment (The optional part of a URL that starts with an octothorpe #) without a preceding query (The optional part of a URL that starts with a question mark ?). This is how Stack Exchange returns tokens and other API's have used the same approach. There is nothing wrong with it. In fact, it ...


1

That error means that you've used an invalid id or that the settings on your app page are incorrect. Do the following: Go to Your Apps page. You should see your app listed. If it is not, then register a new app. Click on your app's settings page. For example: stackapps.com/apps/oauth/view/3996. Note that only the owner can see a given app's settings ...



Only top voted, non community-wiki answers of a minimum length are eligible