skip to Main Content

whenever creating or updating an Ad‘s creative, I’m getting this error:

{
    "error": {
        "message": "Invalid parameter",
        "type": "OAuthException",
        "code": 100,
        "error_subcode": 1772103,
        "is_transient": false,
        "error_user_title": "Instagram Account Is Missing",
        "error_user_msg": "You're using Instagram as a placement. Please select an Instagram account to represent your business in your Instagram ads, or select a Facebook Page to use instead.",
        "fbtrace_id": "..."
    }
}

However, what I simply try to do is to create an Ad for a specifc Page Post and add this to an existing AdSet. To create a new creative for a given Post, I use the /adcreatives endpoint and pass the following:

POST:  https://graph.facebook.com/v3.1/act_<ActId>/adcreatives 
{
    "name": "Test",
    "object_story_id":"<PostIdWithPage>",
}

This works fine so far. But the following update of the Ad results in the error above:

POST:  https://graph.facebook.com/v3.1/<AdId>
{
    "creative": {
        "creative_id": "<CreativeId>",
    } 
}

I guess, the above error happens when I try to add a creative to the Ad that can not be used on Instagram.

But why isn’t it working like in the Business Manager? There, I can simply select a Post for a newly created Ad. If this Post is not valid for Instagram, it shows a warning but it still works.

So, when I want to create a tool that can create Ads based on given Posts, how can I achieve that? How can we come around the error above?

2

Answers


  1. Chosen as BEST ANSWER

    The important missing part here is, that we have to specify instagram_actor_id when creating the AdCreative. The ID can be retrieved by GETting <PageId>/page_backed_instagram_accounts.


  2. Further to the accepted answer, I needed a little bit more information to properly connect an instagram account to my page:

    There are two ways to link in instagram account to your page:

    1. Setup a ‘Page Connected’ instagram account

    Log in as a page admin, go to page settings > instagram and link
    an existing instagram account to the page.

    You can then get the linked instagram account id by doing a GET on:

    <PageId>/instagram_accounts
    

    2. Create a ‘Page Backed’ instagram account.

    This is for when you don’t have an existing instagram account you want to link to your page, and want to instead create a ‘shadow’ instagram account based off your page.

    You can generate a paged backed instagram account by performing a POST on the following endpoint. And retrieve an existing one, by performing a GET.

    <PageId>/page_backed_instagram_accounts
    

    ** Note that both these endpoints require you to have a ‘page access token’ rather than the normal ‘account access token’ you use to create your ads.

    To get your page access token, you can do a GET request on:

    /me/accounts
    

    Then, as stated in the accepted answer – pass your new, linked instagram account id as the instagram_actor_id in your ad creative request.


    Sources:

    https://developers.facebook.com/docs/marketing-api/guides/instagramads/
    https://developers.facebook.com/docs/facebook-login/access-tokens#pagetokens

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