"UNAUTHORIZED_ACCESS" unable to get accounts

oauth
api-access
ads
account-access

#1

I tried to access twitter ads API using my application and twurl. But I can’t get account details, it gives unauthorized access error. Please find my bellow steps for twurl.

1). first I used my consumer key and consumer secret with following command.
twurl authorize --consumer-key xxxxxxxxxxxxxxxxxx --consumer-secret xxxxxxxxxxxxxxxxxxxxxxx

it authenticated successfully.

2). Then I used following command to get account details.
twurl -H “https://ads-api.twitter.com” “/1/accounts/”

But it fails and display following error message

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

How can I solve this ? your help is highly appreciate.
Than you …

My App ID : 12818655


#2

Please check the default app with twurl by command “twurl accounts” (FYI the tutorial is with twurl -T), you may have to do "twurl set default "

Your app looks whitelisted fine to me so I would recommend to keep playing around with twurl as it’s well tested and should be able to get it to work. You can try to make sure it’s updated to latest version.

Thanks,

John


#3

Than you JBabichJapan. It works perfectly.