MISSING_PARAMETER error


#1

Hello,

A client is encountering this error when creating a campaign

Input

{
    "url": "https:\/\/ads-api.twitter.com\/2\/accounts\/18ce53uoohr\/reach_estimate",
    "method": "GET",
    "parameters": {
        "product_type": "PROMOTED_TWEETS",
        "user_id": "534244514",
        "bid_amount_local_micro": "2000000",
        "currency": "EUR",
        "objective": "WEBSITE_CLICKS",
        "campaign_daily_budget_amount_local_micro": "550",
        "locations": "879d7cfc66c9c290",
        "age": "AGE_13_TO_34",
        "gender": "1",
        "languages": "nl"
    }
}

Output

{
    "errors": [
        {
            "code": "MISSING_PARAMETER",
            "message": "At least one of the required targeting criteria need to be specified for reach estimation"
        }
    ],
    "request": {
        "params": []
    }
}

I can send you the access token if necessary

My dev team said :

They say that we are missing a required targeting, but even when sending several primary targetings (as explained here https://developer.twitter.com/en/docs/ads/campaign-management/overview/targeting category Targeting Criteria Combinations).
You can check in your call or mine here, every necessary informations are here

Can you check on your side? Is there a bug?

Thank you,
Theo


#2

Hi @TheoMMR! In your call there are no primary targeting criteria… Primary types are: Followers, Tailored Audiences, Interests, Keywords, TV. And for this endpoint there is no user_id parameter that I can see in the docs - maybe you meant it to be followers_of_users?..


#3

Hello @majoritasdev,

There was a primary targeting criteria in the previous call regarding this documentation : https://developer.twitter.com/en/docs/ads/campaign-management/overview/targeting

My dev team has added

You can check this one, where I also removed the user_id to be sure that it wasn’t the issue

Input

{
    "url": "https:\/\/ads-api.twitter.com\/2\/accounts\/18ce53uoohr\/reach_estimate",
    "method": "GET",
    "parameters": {
        "product_type": "PROMOTED_TWEETS",
        "bid_amount_local_micro": "2000000",
        "currency": "EUR",
        "objective": "WEBSITE_CLICKS",
        "campaign_daily_budget_amount_local_micro": "550",
        "locations": "879d7cfc66c9c290",
        "age": "AGE_13_TO_34",
        "gender": "1",
        "languages": "nl",
        "interest": "1001,1002,1003,1004,1005,1006,1007,1008,1009,1010",
        "tv_shows": "10039616819"
    }
}

Output

{
    "errors": [
        {
            "code": "MISSING_PARAMETER",
            "message": "At least one of the required targeting criteria need to be specified for reach estimation"
        }
    ],
    "request": {
        "params": []
    }
}

The same error occurs. Can you do something on your side?

Thank you,
Theo


#4

Hi @TheoMMR. I don’t know what your dev team is doing, but the parameters you posted are off… Please transmit to your dev team to follow the documentation precisely.

Problems with your request:

  1. gender should be an integer - you’re sending a string
  2. there is not parameter interest - it’s interests
  3. there is no parameter tv_shows

So you still don’t have a primary targeting option. So the error you’re receiving is accurate and expected.

Try to make this request instead and let us know what you receive:

{
    "url": "https:\/\/ads-api.twitter.com\/2\/accounts\/18ce53uoohr\/reach_estimate",
    "method": "GET",
    "parameters": {
        "product_type": "PROMOTED_TWEETS",
        "bid_amount_local_micro": "2000000",
        "currency": "EUR",
        "objective": "WEBSITE_CLICKS",
        "campaign_daily_budget_amount_local_micro": "550",
        "locations": "879d7cfc66c9c290",
        "age": "AGE_13_TO_34",
        "gender": 1,
        "languages": "nl",
        "interests": "1001,1002,1003,1004,1005,1006,1007,1008,1009,1010"
    }
}