Receive 403 UNAUTHORIZED when creating a campaign and associating with funding instrument

api-access
ads
api

#1

While using twurl, and application id (2326477153), I keep running into the following response at Step 3 (Create a campaign and associate it with the funding instrument) of the tutorial: https://dev.twitter.com/ads/campaigns – I simply am using the sandbox API commands provided in the tutorial with twurl.

{
  "errors": [{
    "code": "UNAUTHORIZED_CLIENT_APPLICATION",
    "message": "The client application making this request does not have access to this API"
  }],
  "request": {
    "params": {}
  }
}

Could you please provide more information, since the access token I generated in the authentication process is read/write and I successfully make two READ calls to the ads api (to get the accounts, and funding instruments; step 1 and 2) before running into this error, and I am quite sure my company was whitelisted to use Ads API when we visited San Francisco in November.

Please let me know what’s going on, or if you need any more information from me.

I authorized using my handle @mayorbyrne with the application id mentioned above.

Sincerely,
Kevin M


#2

@mayorbyrne you’ve likely got your app setup as read-only or you may only have read access to the API (Are you an analytics only partner?). As a result, the tokens granted to your app while this is true will only have read only access.

The app ID you provided doesn’t seem to be valid. That looks like it may actually be a user ID and not an app ID.

Can you confirm your app ID? Alternatively, its safe to drop your consumer key in this thread and we can look up your access by that.


#3

@brandonmblack It’s likely I grabbed the user id…i think the application id is 8526922. At any rate, I’ll also give the consumer API key to you: SmCl3M8z4P3ooPvpPYGEmgBla

I set the permissions on the app to read/write, and the header in the twurl request says
"x-access-level: read-write\r\n "

If it turns out this is a read-only access issue, is there a way I can create some sandbox entries so I can test analytics/ads read output?


#4

@mayorbyrne there’s unfortunately no way to simulate analytics in the sandbox as nothing there will actually serve and generate data.


#5

@brandonmblack

I have exactly the same issue:
App ID: 9097150

request:
curl --get ‘https://ads-api.twitter.com/0/accounts/{my managed account}/authenticated_user_access’ --header ‘Authorization: OAuth oauth_consumer_key="{my key}", oauth_nonce="{my secret}", oauth_signature=“pr0bGI%2B3hofDTj4IwHVpWiRzP58%3D”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1453968283”, oauth_token="{my token}", oauth_version=“1.0”’ --verbose

response:
{“data_type”:“user_access”,“data”:{“user_id”:xxxxxxxx,“permissions”:[“AD_MANAGER”,“TWEET_COMPOSER”]},“request”:{“params”:{“account_id”:“my managed account”}}}

request:
curl --request ‘POST’ ‘https://ads-api.twitter.com/0/accounts/{my managed account}/campaigns’ --data ‘daily_budget_amount_local_micro=1000000000&funding_instrument_id={my managed funding_instrument_id}&name=test&paused=true&start_time=2016-02-01T00%3A00%3A01Z’ --header ‘Authorization: OAuth oauth_consumer_key="{my key}", oauth_nonce="{my secret}", oauth_signature=“5kNPUPLxmMO1j1SJdjLNho20DL8%3D”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1453951375”, oauth_token="{my token}", oauth_version=“1.0”’

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

I think have the required authority.
What’s happening?