11
votes
What exactly is a valid OAuth domain name for registering your app?
The OAuth Domain is either:
A valid domain that you own and control, and that is hosted somewhere the client can reach. Say, for example that you owned unicorns.mil.
See this answer and this answer ...
10
votes
Accepted
How can I quickly get an access token for personal use?
It's possible to authenticate yourself via the command line; there's no need to set up a website or so.
Open the application page via https://stackapps.com/apps/oauth and make sure the option 'Enable ...
9
votes
Accepted
Can the redirect_uri contain port number?
You got that error because you set the OAuth Domain like example.com:8080, not the redirect_uri. That's not how you configure non-standard ports; see below.
The redirect uri, with port, feature now ...
6
votes
Accepted
As a user, where in the web UI could I find all the tokens I have granted for Stack Apps?
Go to your profile: https://stackapps.com/users/current
Click the "Edit Profile & Settings" tab: https://stackapps.com/users/edit/current
Click "Applications" on the left sidebar (no handy ...
5
votes
Suddenly getting "Couldn't parse `client_id`"
I expect this to be solved by Cloudflare protection is triggering on Stack Overflow authentication API routes
To reproduce and/or verify this you can use this glitch app for which you can find the ...
rene♦
- 2,762
4
votes
Accepted
Refresh expired acess token basics
Dealing with token expiration is pretty simple.
When a token is/goes bad then, when you make an API call that uses the token, you will get a JSON response like this:
{
"error_id": 403,
"...
4
votes
Accepted
JavaScript SDK-based workflow never pushes message back from OAuth login_success page on Stack Exchange side
Thanks for the report.
This has been fixed; for example you can see that the login demo is working properly again.
4
votes
Creating personal applications using Stack Overflow/Stack Exchange API
If you need something for personal use, it doesn't really matter. You can even use example.com, as long as the site doesn't redirect and change the URL. You'll need a browser and a tool like curl. ...
3
votes
Find out whether a user has association bonus
Yes, you can find out if the user has received the association bonus using the API. It's a bit clunky though.
However, as we discovered, "association bonus rights" are rather meaningless at the ...
3
votes
Accepted
Cannot get redirect_uri to work
There have been no reported changes to the API, officially for many years, (unofficially since January).
But, frankly that script's approach should have never worked. OAuth credentials are sent to:
&...
3
votes
Accepted
Implicit OAuth flow puts the access token in the hash?
No, you can't get the access_token in the query/search part of the URL. This would be a security leak that would allow 3rd parties to see your access_tokens on the web.
Reference:
OAuth2.0 Implicit ...
3
votes
Accepted
Access token keeps being invalidated
Turns out this is completely my fault :/
I overlooked the expiry aspect of the access token which meant that I got the default 86399 seconds (~24 hours), which meant my users had to get a new access ...
2
votes
Stack Exchange OAuth2, explicit access-token response format does not adhere to RFC6749 standard
I had the same problem. According to the authentication docs‡:
In order to get access_token and expires (if applicable) wrapped in a
JSON object, POST to https://stackoverflow.com/oauth/...
2
votes
Accepted
No 'Access-Control-Allow-Origin' for oauth/access_token
The question is not clear enough.
You appear to be trying to use jQuery to do explicit OAuth from a web page. If so, this is not allowed.
Explicit OAuth is for servers. You are not running that ...
2
votes
Accepted
How to use /me to display my profile data in StackExchange API?
For read requests, you must send the token (and key) in the URL. For example:
https://api.stackexchange.com/2.2/me?site=stackoverflow&key=dp55hR5Wr9UhOJReA6F2gg((&access_token=...
2
votes
Accepted
`redirect_uri` is not under the registered domain for this application
I don't know about that Ruby/Gem, but your app registration is not correct.
You need to configure your app for explicit OAuth2, per this other answer, except enter localhost instead of example.com.
...
2
votes
Accepted
OAuth redirect_uri to https://stackexchange.com/oauth/login_success?xxx strips part of the query string
I don't think that's a bug, for implicit OAuth. Anyway, if I understand RFC 6749 correctly, that is not how you are supposed to do such extra checks.
Use the state parameter. And this works.
For ...
2
votes
Accepted
I have created a lot of access_token with no_expiry scope while experimenting. How do I delete them?
This is what the /apps/{accessTokens}/de-authenticate route does.
Passing valid access_tokens to this method causes the application that created them to be de-authorized by the user associated with ...
1
vote
Accepted
App post got deleted
Why is my app post deleted?
My guess is that an automated process did this. You can still view the post, just copy the URL from the 'Manage your applications' page. If it has a banner 'deleted by ...
1
vote
Accepted
How can I use an iOS custom URL scheme as redirect_uri?
It is indeed possible to use custom URL schemes for authentication in an iOS app. Here are the steps I took:
Choose an arbitrary domain, like stackexchange.com, for the OAuth domain in your Stack ...
1
vote
How to get access_token from the uri after the fetch function executes?
As you can see, the access token is in the URL, it's 43w24pKEasZPWEiGljW(5Q)) (the trailing parentheses are part of it).
What you should probably do (unless you're just using the flow to get an ...
1
vote
Permission request form is broken, approve button is hidden, css variables are missing
This was reported on MSO and is now fixed. Adam Lear said:
Looks like I was right and we were, in fact, missing the design library reference.
The fix is live in production. Thanks for the report!
1
vote
Cannot authenticate with OAuth2
I don't know if this is an actual answer to the original issue, but it seems to be working fine now.
You can test by clicking on the button in the doc page: https://api.stackexchange.com/docs/js-lib#...
1
vote
Accepted
How to register a Stack App with explicit OAuth 2.0 flow to a third party site?
Note that a URI is not a domain, but this seems to be a common mistake when setting up OAuth2.
Also reference:
`redirect_uri` is not under the registered domain for this application
What exactly ...
1
vote
How to get access token from the hash?
Refer to the API Authentication docs; there are a great many things wrong with the URL in the question (at least 5).
For starters, it's to the wrong path. stackoverflow.com/oauth/authorize gives ...
1
vote
Localhost test Stack App authentication: error 'redirect_uri' does not match
I get the reason:
Do not use gem 'omniauth-stackexchange', '~> 0.2.1' ,but instead of gem 'omniauth-stackexchange', git: 'https://github.com/nashby/omniauth-stackexchange.git'
The reason see this:...
1
vote
Accepted
oauth 2.0 based on stackexchange api and fetch user details
You can do this using the /me endpoint or the /me/associated endpoint.
/me
Returns the user associated with the passed access_token.
Use this if you want to get user info for a specific site (e.g....
1
vote
access_token not present in /oauth/access_token response
Unpack response content with $response->getBody()->getContents().
use GuzzleHttp\Client;
Route::get('/approve', function () {
header('Location: https://stackexchange.com/oauth?client_id=12345&...
1
vote
Accepted
Getting an API key for an application without a server
You don't need a server to get an API key, or even to use OAuth2.
Set OAuth Domain to: stackexchange.com, and
Application Website to: https://stackapps.com/.
See this other answer for more ...
1
vote
Accepted
The new implicit authentication dialog doesn't handle comma-delimited scopes
This appears to have been silently fixed, sometime in the last year.
Now, both:
https://stackexchange.com/oauth/dialog?client_id=1515&scope=read_inbox,write_access,private_info&redirect_uri=...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
oauth2 × 99support × 69
authentication × 42
api × 30
bug × 24
api-v2.2 × 19
status-completed × 15
api-v2 × 13
feature-request × 7
javascript × 7
app × 4
api-key × 4
python × 4
php × 4
registration × 4
stackapps × 3
c# × 3
apps × 3
discussion × 2
library × 2
api-v2.1 × 2
write-access × 2
ruby × 2
ios × 2
script × 1