Oauth password grant type


#1

I’m using the oauth2 provider in tyk to authorize clients. I’m getting the following error message while calling the oauth/token endpoint

Method: POST
http://my-tyk-instance.com:8080/product-api/oauth/token/

grant_type = password
client_id = cb417e700ac346244994064736c5c119
username = [email protected]
password = test1243

Header:

Authorization: Basic Y2I0MTdlNzAwYWMzNDYyNDQ5OTQwNjQ3MzZjNWMxMTk6TnpjME5qSmxOamt0WWpWbU5DMDBNREU1TFRZNU16RXRZMkZpTXpRd04yUXlaR0Zo

Error message:

{“error”:“access_denied”,“error_description”:“The resource owner or authorization server denied the request.”}

I’m using my tyk dashboard account to create the token, but is this the right way?


#2

The username and password you use must be a token (basic auth) that you generate in the dashboard, not a dashboard user.


#3

I’m using the oauth Authentication mode for the api, not basic auth? So where can I create these credentials?


#4

Fixed it, I have created one in the key section! Thanks for you help!