I am trying to create an ads account on the twitter sandbox api.
I first retrieve a request token and convert that request token into an access token, so I think my signature and parameters are correct.
I run the following code:
r = requests.post(url, data={'name': 'Name'},headers={'Authorization': DST})
url = 'https://ads-api-sandbox.twitter.com/3/accounts/'
DST = OAuth oauth_consumer_key= "nlrp3r8PZyct2o7I6SYPx4ee1", oauth_nonce= "oDOXc9WD8SqZNfAp3Iw2B9Qzt0EMOSO2", oauth_signature= "nlC6adCN1yyYPMBflpIvrx74DOQ%3D", oauth_signature_method= "HMAC-SHA1", oauth_timestamp= "1535721065", oauth_token= "2361748680-b2CoGZyg1AHT65LrWQLHVyBiTryG5Ej7BKMaw9f", oauth_version= "1.0",
the response code is 401 with the following text:
{"errors":[{"code":"UNAUTHORIZED_ACCESS","message":"This request is not properly authenticated"}],"request":{"params":{}}}
I have tried with and without the data in the request.
I mainly used the following resources: