I am trying to make request to Twitter Ads API using Oauth2 Bearer token and getting “UNAUTHORIZED_ACCESS” error.
By using same Bearer token I am able to access Twitter API (api.twitter) endpoints.
We have Ads API access (app 23612440). After we got access to Ads API we regenerated Bearer token. I am also able to access Ads API with Twurl.
Is Oauth2 available for Ads API or am I missing something?
Hello.
Thanks for reaching out. Can you try changing to OAuth 1.0 to see if the API call can be made?
Hi,
The same request is working correctly with Oauth1.0 and I receive accounts in response. However I would prefer to use Oauth2.0 if it is possible.
Hello,
Unfortunately, oAuth 2.0 is only in testing phase and not fully rolled out yet. As such, please use oAuth 1.0 for now. Apologies for the inconvenience caused.
p4tric
#5
@jaredtcy is oAuth 2.0 still on testing phase until now?
p4tric
#6
I tried using twurl authorize and i get Authorization Successful message. Then after executing
twurl -H ads-api.twitter.com “/11/accounts”, I got these error. See screenshot:
Please advise on what I am missing, thanks.
Hello,
Yes. Oauth2.0 is still in testing phase. Can I verify that you have applied for access to Ads API? Do you have your AppID so that I can check on my end? Thanks
p4tric
#8
ok, yeah already applied ads api. here is my appId: 24210607
Hello,
Could you try running this on terminal:
rm .twurlrc
Once done, try running twurl authorize again and perform the API call. Let me know if it works.
p4tric
#10
@jaredtcy
After entering PIN from the authorization, I tried executing: twurl -H ads-api.twitter.com “/11/accounts”
It returned this:
{“request”:{“params”:{}},“next_cursor”:null,“data”:}
Why is it returning an empty array? Please advise, thanks.
Hello,
Can I verify if you have added a funding instrument/payment method? You will need to do so before the Ads Account can be “Active”