How to generate Authorization Header


#1

Hello, I am trying the Ads API generating the authorization header in the same way as for the public api of twitter, and it tells me that the request has not been able to authenticate, is it necessary to generate the authorization header in a different way?

{
“errors”: [
{
“code”: “UNAUTHORIZED_ACCESS”,
“message”: “This request is not properly authenticated”
}
],
“request”: {
“params”: {}
}
}

Thank you.


Guidance for UNAUTHORIZED_ACCESS issues
#2

What method of OAuth are you using? The Ads API requires a user context (will not work with app-only auth).


#3

I am using the same method of OAuth than the public rest api, with app-key,app-secret,consumer key and consumer secret.
This is an example of header that i am generating: OAuth oauth_consumer_key=, oauth_nonce=“332A085E”,oauth_signature=“7wF6wBmolI4TTOKD0vtye%2FFwOkU%3D”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1500470358”, oauth_token=,oauth_version=“1.0”