How to get permanent USER_OAUTH_TOKEN, USER_OAUTH_TOKEN_SECRET?

api

#1

Hi,

Recently I am working on set up an automated feed from Twitter Ads API. I found an git hub repository

The code on “fetch_stats.py” requires the following authentication credentials to make a request:
CONSUMER_KEY, CONSUMER_SECRET, USER_OAUTH_TOKEN, USER_OAUTH_TOKEN_SECRET.

I found CONSUMER_KEY, CONSUMER_SECRET from https://apps.twitter.com/app/503412/keys
Where can I find USER_OAUTH_TOKEN, USER_OAUTH_TOKEN_SECRET?

Do I need to request for these two? Is there any way to get permanent USER_OAUTH_TOKEN, USER_OAUTH_TOKEN_SECRET, not temporary?


#2

@ashfaqemrul if you have a look at our getting started documentation, you’ll see that there is a section about HTTP & OAuth - if you read that, you should have all relevant information about how to go about this.


#3

I am getting the following error message

[{u’message’: u’The client application making this request does not have access to this API’, u’code’: u’UNAUTHORIZED_CLIENT_APPLICATION’}]

Please advise.


#4

It sounds like you don’t have access to the Ads API, at least with the application you are trying to access it with. Have you applied for access to the Ads API program?


#5

@andrs,

Are you talking about getting access mentioned in this page?

https://dev.twitter.com/ads/overview

I applied for developer access yesterday. It’s still pending.

Our company owns multiple apps. We have multiple campaigns for those apps. All I need to do is pulling all analytic data like impressions, clicks, spend and downloads per campaign. Can you suggest me better approach to do that or any documentation to get some ideas? That will be a great help for me.


#6

@ashfaqemrul you need to wait for your application to be processed. You can’t access the Ads API without an app that is authorized to use it.


#7

I am getting a similar error.
My account has access to the ads account. Also the app i want to use, is on the same account.

Which OAuth method do i use to give access to the API for the ads account.

Please suggest


#8

@ShadabTughlaq you need more than access to the ads account, you need a Twitter developer app that has access to the Ads API. The Ads API only supports the 3-legged version of OAuth 1.0a and we primarily only deal with user auth tokens.

If you haven’t applied for access to the Twitter Ads API you can do so here.

If you do have developer access to the Twitter Ads API, have read all the auth related docs and are still having auth issues please open a new thread and make sure to include enough actionable information for us to help you with your issue.

Lastly, before you started a new thread please make sure you’ve fully read our Guidelines for Reporting Issues in the forums and be prepared to use tools like twurl to help us troubleshoot the issue with you.


#9