skip to Main Content

I am trying to change the status of a Facebook campaign using their Marketing API as documented here. However, I keep encountering the following error:

{
    "error": {
        "message": "Unknown path components: /<campaignId>",
        "type": "OAuthException",
        "code": 2500,
        "fbtrace_id": "AZruauHBbtO4IzLuRmF90c-"
    }
}

Here is the full API request I’m making:

https://graph.facebook.com/v19.0/act_<accountId>/campaigns/<campaignId>?access_token=<token>&status=PAUSED

I’ve tried double-checking my IDs and access token, and they are correct.

Can anyone help me understand what might be going wrong and how to fix this error?

What I’ve tried:

  • Verifying that the campaign ID and access token are correct.

  • Checking if the endpoint and parameters are correctly formatted.

2

Answers


  1. Quote right from the place that you linked to:

    You can update a Campaign by making a POST request to /{campaign_id}.

    – so the act_<accountId>/campaigns/ part you had in your request URL, doesn’t belong in there. (That is only necessary when creating a campaign under a specific account, or modifying the relation between account and campaign.)

    Login or Signup to reply.
  2. I could update the campaigns (PAUSE/ACTIVE) using the following URL structure:

    https://graph.facebook.com/v20.0/<<CPG_ID>>?access_token=<<YOUR_TOKEN>>&status=ACTIVE

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search