Can't change bid_type from MAX to AUTO




We have a problem when changing bid_type on line_item from MAX to AUTO.


  1. Create line_item using
    Endpoint: ‘

‘account_id’ => ‘18ce545gvch’
‘name’ => ‘Group bid test’
‘campaign_id’ => ‘49e92’
‘bid_amount_local_micro’ => 1000000
’bid_type’ => ‘MAX’
‘product_type’ => ‘PROMOTED_TWEETS’
‘placements’ => ‘ALL_ON_TWITTER’
‘objective’ => ‘WEBSITE_CLICKS’
‘paused’ => 0
’total_budget_amount_local_micro’ => 10000000

  1. Change line_item
    Endpoint: ‘

‘account_id’ => ‘18ce545gvch’
‘name’ => ‘Group bid test’
‘bid_type’ => ‘AUTO’
‘paused’ => 0
’total_budget_amount_local_micro’ => 10000000
’bid_amount_local_micro’ => NULL

we have tried with ‘bid_amount_local_micro’ => NULL and omitting it.

Thanks in advanced!


Hi @Jancic_A! And what is the error you are receiving after the second call? Or is there no error but the bid_type simply doesn’t change?

  • With “bid_amount_local_micro” we get UNAUTHORIZED_ACCESS (This request is not properly authenticated).
  • Without we get MISSING_PARAMETER (“bid_amount_local_micro” is a required parameter).


Try setting, instead, the parameter automatically_select_bid to true, and bid_amount_local_micro to null.


@Jancic_A can you reproduce the issue with twurl and post the results?

The UNAUTHORIZED_ACCESS error is an OAuth error likely caused by how one or more parameters and their values are being string encoded and signed as part of the request. You won’t see this error for many other reasons.

If you can’t reproduce the issue with twurl, that rules out an API error and we can focus on what’s causing this on the API consumer side.


Sorry to all.

We found a bug in our code (PHP->“http_build_query” removes variables with null values).
We fixed the bug and now we send proper data (bid_amount_local_micro=null).:smile:

Thanks to all!


@Jancic_A perfect. Glad to hear you solved it!