Hi,
I am trying to do a request to obtain some accounts data, and after that I want to do another request to get some insights like impressions or conversions. All requests are returning the same response, an error which code is “UNAUTHORIZED_CLIENT_APPLICATION”, and message “The client application making this request does not have access to Twitter Ads API”
Going deeper about I have done:
-
I have a twitter account, let’s call “Account1”. In twitter Ads section, I have some Ads accounts, and some ads for each one. I want to access to the ads insights (impressions, conversions, expense) for each ads account.
-
I have another twitter account (“Account2”), which is also a developer account. I have created an app, and generated the tokens: Api Key, Api Secret Key, Access token and Access token secret. The permissions level are “Read, write and direct messages”.
-
From twitter “Account1”, Twitter Ads section, I selected one of my ads account, and I edited the access to the account, giving to twitter “Account2” account administrator permissions for this ads account. So If I log in “Account2”, now I can see the Ads account of “Account1” I gave permissions.
-
The request. I am doing a simple GET request to obtain the insights for a specific ads account:
https://ads-api.twitter.com/5/insights/accounts/:accountId
being :accountId the id of the ads account I gave permissions to read from my twitter Account2
In terms of request Authorization, I am using the type OAuth 1.0, with the following parameters:
Consumer Key: API key from the developer account app.
Consumer secret: API secret key from the developer account app.
Access Token: Access token from the developer account app.
Token Secret:Access token secret from the developer account app.
Signature Method: HMAC-SHA1
And the response is that I wrote at the beginning of the topic.
I don’t know if the problem is that I want to access from one account to ads of another account, or I am not giving to the “Account2” the correct permissions, or if I am missed some steps, but honestly, at least for me, the documentation is not very clear at this point.
Please could you provide me some feedback about what is happening, and how I can do the request?
Thanks in advance.
Regards
jrsyo
#2
@labs_antevenio ,
Did you apply for the Ads API access from here?
The Twitter Ads API has its dedicated permission profile and your App needs to be whitelist by us after you submit a form above. Otherwise, your App doesn’t have access to the Ads API by default.
Also, please be noted that we strongly recommend creating a dedicated App for the Ads API use if you’re already using your App to access consumer Twitter APIs due to OAuth token caps limit we enforce ( → to max 5 tokens, see details) when we whitelist your App for the Ads API.
system
Closed
#3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.