Cannot get campaigns of an account


#1

Problem descriptions:

  1. App id: 7124109
  2. Target account:18ce53yytmv add the app as AD Manager
  3. We can get the information of the account by GET /0/accounts/18ce53yytmv
  4. But we cannot get the campaigns of the account through /0/accounts/:accountid/campaigns. (UNAUTHORIZED_CLIENT_APPLICATION)
  5. All requests are under twurl. And the consumer_token and access_token are from the app.
  6. Actually we can use the same way to get the data about two weeks ago. But it does not work anymore.

Below are more detail for each request.

  1. call get account detailed information, API> twurl -t -H ads-api.twitter.com /0/accounts/18ce53yytmv

    {
    “data”: {
    “approval_status”: “ACCEPTED”,
    “created_at”: “2015-04-29T02:18:14Z”,
    “deleted”: false,
    “id”: “18ce53yytmv”,
    “name”: “Eric”,
    “salt”: “81ebb6cdc775ea7633e81da8baf635c8”,
    “timezone”: “America/Los_Angeles”,
    “timezone_switch_at”: “2015-04-28T07:00:00Z”,
    “updated_at”: “2015-04-29T06:37:06Z”
    },
    “data_type”: “account”,
    “request”: {
    “params”: {
    “account_id”: “18ce53yytmv”
    }
    }
    }

    2: call get account permissions information, API> twurl -t -H ads-api.twitter.com /0/accounts/18ce53yytmv/authenticated_user_access

    {
    “data”: {
    “permissions”: [
    “AD_MANAGER”
    ],
    “user_id”: 39596342
    },
    “data_type”: “user_access”,
    “request”: {
    “params”: {
    “account_id”: “18ce53yytmv”
    }
    }
    }

    3: call get account campaigns list, API> twurl -t -H ads-api.twitter.com /0/accounts/18ce53yytmv/campaigns

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

#2

Any update with the issue? Should I provide more information here?


#3

Is this still an issue for you @BangWoei? As far as we can see from our end, everything seems ok?

Request

twurl -H ads-api.twitter.com /0/accounts/18ce53yytmv/campaigns | jq .

Response

{
  "request": {
    "params": {
      "account_id": "18ce53yytmv"
    }
  },
  "data": [],
  "data_type": "campaign",
  "total_count": 0,
  "next_cursor": null
}

#4

@andrs Thanks for response! It is still an issue for us. I am afraid if we did any thing wrong with authorization. Here are the steps we tried with twurl

  1. Install twurl
  2. twurl authorize —consumer-key CONSUMER_KEY_OF_7124109 --consumer-secret CONSUMER_SECRET_OF_7124109
  3. Get pin URL in response.
  4. Go to the URL in browser. Authorize the app with @netbase (the owner of 7124109)
  5. Paste the pin code in command line.
  6. twurl accounts --> See Netbase in the list.
  7. twurl -H ads-api.twitter.com /0/accounts/18ce53yytmv/campaigns --> See UNAUTHORIZED_CLIENT_APPLICATION error.

#5

Hi,

Sorry that you are still having troubles. Could you please try to do "twurl set default " which is the same as the accountName you want to be authed as from .twurlrc file? (I assume it’s NetBase in this case) This is explained in “twurl -T” tutorial mode but simply helps to make sure you are using the credentials you think you are using.

If you are still having trouble, please let us know if you can get /campaigns for the same ID of the application.


#6

@JBabichJapan Thanks for reply!

18ce53yytmv is the id of account neterictw who set account NetBase (the owner of application) as AD Manager. We are unable to get its campaigns.

We also tried to get /campaigns for the same ID of the application like below but with no luck.

Get Account Info(OK)
twurl -H ads-api.twitter.com /0/accounts/nkoqe/
{“data_type”:“account”,“data”:{“name”:“NetBase”,“timezone”:“America/Los_Angeles
”,“timezone_switch_at”:“2014-03-07T08:00:00Z”,“id”:“nkoqe”,“created_at”:“2012-05
-14T22:18:05Z”,“salt”:“xxxxx”,“updated_at”:“2015-04-0
9T22:35:44Z”,“approval_status”:“ACCEPTED”,“deleted”:false},“request”:{“params”:{
“account_id”:“nkoqe”}}}

Cannot Get Campaigns
twurl -H ads-api.twitter.com /0/accounts/nkoqe/campaigns
{“errors”:[{“code”:“UNAUTHORIZED_CLIENT_APPLICATION”,“message”:“The client appli
cation making this request does not have access to this API”}],“request”:{“param
s”:{}}}

To make it clear. We only authorize one account under twurl which is already as default like below

twurl accounts
NetBase
xxxxxxxxxxxxxxxxxxxxx (default)


#7

@BangWoei can you give the GET /campaigns request another try and let us know if it’s working now?

twurl -H ads-api.twitter.com /0/accounts/nkoqe/campaigns

#8

@brandonmblack Thanks for help! It works for us now.


#9

@BangWoei great to hear. Sorry about the hassle.