I'm using the authorization_code
grant type. I've already created a client, the auth_code and then created access and refresh tokens, all successfully.
Now I try to use the access_token and here comes the problem. If I put it as a request/query parameter access_token=123456789
, it works perfectly, I get the requested resource.
But I've read that it's actually better to embed it in the Authorization header for security reasons. I'm trying this and doesn't work:
Authorization: Bearer 123456789
also tried:
Authorization: 123456789
and nothing works. All I get is:
{
"error": "access_denied",
"error_description": "OAuth2 authentication required"
}
Any ideas? If I'm using SSL in both server and client, can I safely use parameters instead of headers?