We had a daily connection established to the ads API before with the below details:
Account email:Twitter@seera.sa
ConsumerKey=“T22U…ejFq”
But we recently started getting an error each time we call the API (error message attached), we are asking for support on how to generate these tokens/secrets from the portal again as we believe it is an authentication issue.
Hello, @BasselSalaas! Thanks for your message. Is this happening for all requests to the Ads API? Does it affect your access to non-Ads API endpoints as well?
If you need to regenerate your keys and tokens, you can do so via developer.twitter.com/en/apps/<your app ID>. Once you’ve selected the app you want to regenerate your tokens for, click on the “Keys and tokens” tab. You’ll see buttons for regenerating consumer API keys and access token & access token secret.
Please let us know if that resolves the issue.
Thanks!
Hi @juanshishido, we currently only have Ads API integrated currently and have 2 other consumerSecret running (under the same consumerKey) with no issues.
The shared link has no apps listed, and it only has the option of creating a new app but that is requesting to create a new developer account for the team, aren’t we supposed to have one? I have got account admin role in my account. Am I missing anything here?
Appreciate the support!
Thanks for the reply, @BasselSalaas.
If you know which app you need to regenerate your keys and tokens for, you must make sure you’re signed into the Twitter user account that owns the app.
The folks in the Developer Portal section may have more insight. (I see that you originally posted there, but someone moved your topic to this category. Possibly because they saw “Ads API” and thought it belonged in this section.)
@juanshishido, Thanks for the support, we appreciate it!
We were able to find the apps, but we get the below error description (403 forbidden) when using the new tokens and secrets. Can you please advice.
“HttpResponseProxy{HTTP/1.1 403 Forbidden [date: Sun, 09 May 2021 09:07:29 GMT, server: tsa_devel, x-runtime: 2.64E-4, set-cookie: personalization_id=“v1_5WUMMu55IAqc87epGsfe/A==“; Max-Age=63072000; Expires=Tue, 09 May 2023 09:07:29 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None, set-cookie: guest_id=v1%3A162055124990224336; Max-Age=63072000; Expires=Tue, 09 May 2023 09:07:29 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None, content-type: application/json;charset=utf-8, cache-control: no-cache, no-store, max-age=0, x-api-version: 9.0, x-transaction: 80b3c51f62286069, x-access-level: read-write-directmessages, x-frame-options: SAMEORIGIN, x-xss-protection: 0, x-rate-limit-limit: 2000, x-rate-limit-reset: 1620551811, content-disposition: attachment; filename=json.json, timing-allow-origin: https://twitter.com, https://mobile.twitter.com, x-current-api-version: 9.0, x-content-type-options: nosniff, x-rate-limit-remaining: 1997, strict-transport-security: max-age=631138519, x-connection-hash: bc035523e8218f9879e69aa9a074e7e00e8771271fa4823facbd3b3007f0e681] org.apache.http.client.entity.DecompressingEntity@7c3fdb62}”
Glad to hear it!
Could you please provide details on the specific request you’re making as well as the API response body and error message you’re seeing?
@juanshishido please find below the request and API error message.
request url:- https://ads-api.twitter.com/9/accounts
response :- HttpResponseProxy{HTTP/1.1 403 Forbidden [cache-control: no-cache, no-store, max-age=0, content-disposition: attachment; filename=json.json, content-type: application/json;charset=utf-8, date: Sun, 16 May 2021 08:54:25 GMT, server: tsa_m, set-cookie: personalization_id=“v1_Xh4kJrOwDd2pWobquh8TxA==“; Max-Age=63072000; Expires=Tue, 16 May 2023 08:54:25 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None, set-cookie: guest_id=v1%3A162115526558970396; Max-Age=63072000; Expires=Tue, 16 May 2023 08:54:25 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None, strict-transport-security: max-age=631138519, timing-allow-origin: https://twitter.com, https://mobile.twitter.com, x-access-level: read-write-directmessages, x-api-version: 9.0, x-connection-hash: 15b9737c8b2f20eba5e7efc38ddf8766, x-content-type-options: nosniff, x-current-api-version: 9.0, x-frame-options: SAMEORIGIN, x-rate-limit-limit: 2000, x-rate-limit-remaining: 1999, x-rate-limit-reset: 1621156165, x-response-time: 110, x-runtime: 5.37E-4, x-transaction: 000183c9003cf812, x-xss-protection: 0] org.apache.http.client.entity.DecompressingEntity@7bf3a5d8}
@BasselSalaas Could you please share the error message string that the API is returning? Is it something like the following?
{
"errors": [
{
"code": "UNAUTHORIZED_CLIENT_APPLICATION",
"message": "The client application making this request does not have access to Twitter Ads API"
}
],
"request": {
"params": {}
}
}
If so, it means the app you are using (based on the auth credentials you are using) does not have access to the Ads API.
Hi @juanshishido , thanks for your continuous support. Yes, we do get the same error but with code 403 forbidden.
Does this mean that we need to request access to Ads API and fill the form again or can we get authorized since we have got the approval before?
system
Closed
#10
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.