We received authorization for our app to us ads api access on 10/23:
"Your application (ID:16885731) has been approved for the Twitter Ads API program and your organization has been granted a Developer license for Read/Write access. "

And we can successfully authorize the app to the account and run other twurl commands on the account but when we attempt to run twurl command on the ads api eg : twurl -H “https://ads-api.twitter.com” “/6/accounts/”
we get the following error:
{“errors”:[{“code”:“UNAUTHORIZED_CLIENT_APPLICATION”,“message”:“The client application making this request does not have access to Twitter Ads API”}],“request”:{“params”:{}}}

Please advise…

Hello, @NFHSNetwork. Welcome!

Could you please provide the response headers you’re seeing with this request?

Sorry I keep getting the following when i try to post the headers:

~]$ twurl -t -H “https://ads-api.twitter.com” “/6/accounts/”

opening connection to ads-api.twitter.com:443

opened

starting SSL for ads-api.twitter.com:443

SSL established

← “GET /6/accounts/ HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: /\r\nUser-Agent: OAuth gem v0.5.4\r\nContent-Type: application/x-www-form-urlencoded\r\nAuthorization: OAuth oauth_consumer_key="acjMk6q3gKFDCP4apBvG2MGVt", oauth_nonce="mQp647kDBSqXD5gcFCNq1VfmPs08wyzD7tfmOnE", oauth_signature="5PpbzD7B8NREX4JGBzeTBQ43srM%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1571785509", oauth_token="18018668-oJT6V3h5aBLdhbhshGFmOxvi0MEObgB4l3MLnjt3l", oauth_version="1.0"\r\nConnection: close\r\nHost: ads-api.twitter.com\r\nContent-Length: 0\r\n\r\n”

← “”

→ “HTTP/1.1 403 Forbidden\r\n”

→ “connection: close\r\n”

→ “content-disposition: attachment; filename=json.json\r\n”

→ “content-encoding: gzip\r\n”

→ “content-length: 172\r\n”

→ “content-type: application/json;charset=utf-8\r\n”

→ “date: Tue, 22 Oct 2019 23:05:09 GMT\r\n”

→ “server: tsa_b\r\n”

→ “set-cookie: personalization_id="v1_aps5ai7URF0YESjHetQB2Q=="; Max-Age=63072000; Expires=Thu, 21 Oct 2021 23:05:09 GMT; Path=/; Domain=.twitter.com\r\n”

→ “set-cookie: guest_id=v1%3A157178550989389926; Max-Age=63072000; Expires=Thu, 21 Oct 2021 23:05:09 GMT; Path=/; Domain=.twitter.com\r\n”

→ “strict-transport-security: max-age=631138519\r\n”

→ “x-access-level: read\r\n”

→ “x-api-version: 6.0\r\n”

→ “x-connection-hash: 07d126fa2627b21cd727ab3dc288471e\r\n”

→ “x-content-type-options: nosniff\r\n”

→ “x-current-api-version: 6.0\r\n”

→ “x-frame-options: SAMEORIGIN\r\n”

→ “x-rate-limit-limit: 2000\r\n”

→ “x-rate-limit-remaining: 1999\r\n”

→ “x-rate-limit-reset: 1571786409\r\n”

→ “x-response-time: 15\r\n”

→ “x-runtime: 0.003565\r\n”

→ “x-transaction: 007a938c00644749\r\n”

→ “x-xss-protection: 0\r\n”

→ “\r\n”

reading 172 bytes…

→ “”

→ “\x1F\x8B\b\x00\x00\x00\x00\x00\x00\x00,\x8EA\n\x830\x10\x00\xBF\xB2\xEC\xD9\x17x\vVh@TJ\xBC\xB4\x14\tq\xD1PMl\xB2m\x0F!\x7F\xAF\x85\xDEg\x86IH!\xF8\x10\xB1\xBC%4~",qh\xC5\xA0\xCE\xDDE^\xEB\xD3X5\xB2n\xD5(\xFA\xBE\x91\x95P\xB2k\xB1\xC0\x8Db\xD4\xF3\x8FU\v\x81Y-9\x06\xBD\xEF\xAB5\x9A\xADw\xB0\xE9\x87u3\xF0b#\x04z\xBE(2L\x9E"8\xCF\xB0\xE87\x816\xE6\x88\x00{P\x1F\xCBL\x01\xC4\x14A\xF4\x12\xF3\xBD\xC0\xBF\x83e\xC2]\a\xBD\x1D\x7F)\xE7\xFC\x05\x00\x00\xFF\xFF\x03\x00\xBDR\xC4\f\xAE\x00\x00\x00”

{“errors”:[{“code”:“UNAUTHORIZED_CLIENT_APPLICATION”,“message”:“The client application making this request does not have access to Twitter Ads API”}],“request”:{“params”:{}}}read 172 bytes

Conn close

Any word on this?

Still awaiting word

@NFHSNetwork Please make sure you’re using the right token/secret…

See which one is used right now by the following command:

$ twurl accounts

You can also re-authenticate with your App:

twurl authorize --consumer-key key --consumer-secret secret

Neither of these help… twurl account shows the correct users while the authorizing again does returns the same output:
{“errors”:[{“code”:“UNAUTHORIZED_CLIENT_APPLICATION”,“message”:“The client application making this request does not have access to Twitter Ads API”}],“request”:{“params”:{}}}

Pleas advise

Thanks for providing the request headers.

The request headers indicate that you’re using a different app to make the request. You’re using app 14194323, which does not have access to the Ads API rather than app 16885731, which does have access.

As @jrsyo suggested, please make sure you’re using the correct app. The app with access currently has the following consumer key: TdbdqcL2pADfgDPAbXYWrM6s1.

Please let us know whether that resolves the issue.

1 Like

Thank you that worked

Glad to hear it. Let us know if you have any other questions. Thanks!