I am trying to build an automated system that periodically fetches data from the twitter ads api automatically.
I believed that this would require an Oauth 2.0 token since i am looking for a automated system. However, my generated oauth 2.0 token does not seem to be able to get any data.
I have therefor been advised to revert to the Oauth 1.0 system. The process of using this system requires generating an Oauth Token.
I do have a registered app. It is from the app that i am getting the following values -
Consumer API key:
Consumer API secret:
Access token:
Access token secret:
However, to be able to use the API, as per the documents, I need the oauth token and the oauth signature.
The oauth token which as i understand is different from the Access Token.
As per the documents, the oauth token generation process requires already having the the oauth signature to be successful.
However, as per the documentation, the process of generating the oauth signature requires already having an oauth token which is what i am trying to generate in the first place
I have the following questions:
-
Do i need the Oauth 1 or the Oauth 2 token for the Twitter Ads API.
-
As i am trying to create an automatic system, I do not wish to have a user authorising manually every time so how will the Oauth 1 token work for this instance. What will i have to put in the oauth call back url
-
How do I generate an Oauth 1 token when i cannot generate a signature since the process of generating a signature requires already having an Oauth token
-
Is the Oauth signature unique for every API query so i will have to recreate it every time i have to make a new API call query ( i.e. for every newly create unique query i have a new Oauth signature which i can use the same signature for the same query being run multiple times periodically?)
-
The oauth_nonce is any randomly generated value as long as it is in the correct format?
Thanks,
Shiv