I'm doing with https://getkong.org/plugins/oauth2-authentication step by step.
POST to http://localhost:8001/oauth2/token I can't get the token and the response is 404.
My body params :
client_id:xxx
scope:xxx
client_secret:xxx
provision_key:xxx
authenticate_userid:xxx
You must use https
Is not Admin API?
https use 8443 port
Could not get any response after POST https://localhost:8001/oauth2/token
If I visited https://localhost:8443/{api}/oauth2/token
Response output:
{
"error": "unsupported_grant_type",
"error_description": "Invalid grant_type"
}
Indeed you have to use the 8443 (configurable port). What is the grant_type you use at the moment?
If you have for example authorization grant, then you can do:

what is the code? how can I get it?
for authorization grant this is the authorization code (which you have to pickup first, before calling /token endpoint):

Can not get token still...
Is there anything wrong?



did you create oauth2 credentials for your consumer?
try: http://localhost:8001/consumers/{consumer_id}/oauth2 on your consumer to verify if oauth2 client_id and client_password exists, including callback uri

Can you try sending as form url-encoded in your REST client ? Seems ok to me
I found your POST Headers contain Authorization: xxxxx , what it is?
I'm using paw like you :

Using Kong 0.8.3, I run through all steps just in case, using postman now :-):
API:

An a consumer:

Verify OAuth2:

And as well for consumer:

Get the authorization code:

And that should work.
You need to request the token on the proxy port 8000, while still including the right request_path or request_host to help Kong identify the API.
I do all step once again but the same problem appeared.
I GET http://localhost:8001/consumers/7e84c1cc-7d7a-40dd-86b8-6ef935304d31/oauth2
{
"consumer_id": "7e84c1cc-7d7a-40dd-86b8-6ef935304d31",
"client_id": "clientid002",
"id": "bd71012e-4b66-4254-b877-a8748dc8eb41",
"created_at": 1471310810000,
"name": "appname2",
"redirect_uri": "[\"http:\\/\\/www.baidu.com\"]",
"client_secret": "clientsecret002"
}
The redirect_uri contain escape character but you have not.
How do you added the redirect_uri?
Is this about database? I'm using postgresql.
There is a problem with Postgresql really.
I use the cassandra ,everything is OK.
I think there is a bug with use postgresql...
@seedotlee what version of Kong are you using? Can you try with latest 0.9 ?
@thefosk v0.8.3
@seedotlee I reccomend upgrading to 0.9 - I think this bug has been fixed there.
@thefosk OK, thanks!
I am unable to get authorization_token

need help in resolving the issue
I am unable to get authorization_token
need help in resolving the issue
Are you able to resolve this? I am getting the same error!
https://localhost:8443/oauth2/token 404 with {"message": "no Route matched with those values"}
I am getting the same error! Need Help! @subnetmarco
I am getting the same error https://github.com/Kong/kong/issues/1500#issuecomment-549107330 too :(
Getting same error here. Has anyone fixed it?