Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:15:55 +0000.
Sender:Pascal Combescot
.
Date:Friday, 12 June 2015 15:35:31 UTC+1.
Hi,
I cannot find the documentation on the /oauth/token/ API
I am trying to get an access_token from a code generated via the /tyk/oauth/authorize-client/ endpoint
The request look like this :
curl -H “Authorization: Basic {{client secret}}” -d “grant_type=authorization_code&client_id={{client_id}}&code={{auth code generated by /tyk/oauth/authorize-client/}}” http://localhost:8080/APPID/oauth/token/
I am getting the following response :
{“error”:“invalid_request”,“error_description”:“The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.”}
In the log I find the following message :
ERRO[82160] ERROR: Invalid authorization message
It seems to be the right Header and the right syntax since if I delete the “Basic” in the Authorization Header I have this message “Invalid authorization header”
What should I put in this Authorization Header ? Not the client secret ?
Thanks in advance
Pascal Combescot