How to generate signature without access token and secret

ads

#1

I noticed that for AdsApi, in v0 “Requires authenthication” is “Yes (user context only)”

But in v1, it is “Yes”.

So, first question is, does this mean that the new v1 call in link below permit application token (as opposed to user token) to make the call?

//v1
https://dev.twitter.com/ads/reference/1/get/stats/accounts/%3Aaccount_id

//v0
https://dev.twitter.com/ads/reference/get/stats/accounts/%3Aaccount_id

Second question, I noticed method to generate the authorization header in below link, I noticed that in Twitter there is “OAuth Signature Generator”, and it will generate the authorization header even if I dont supply the token.

Since the documentation only explain on how to generate the signature using token, how do I generate signature without supplying the token (in case of application token, where I only supply Consumer key and consumer secret)?

https://dev.twitter.com/oauth/overview/creating-signatures


#2

The new v1 analytics endpoints still require user tokens to complete the request. That was a documentation oversight, and has just been fixed. All Ads API requests that are account-specific will always require user authentication
If you’re still interested in making application-level requests, I’d encourage you to look at Application only authentication page.

It’s generally easier and more reliable to use an existing OAuth library instead of writing your own from scratch, some it’ll saves quite a bit of effort, and will have been well-vetted by the community.