I get a RangeError.TOO_LOW error, but I have set all the required fields. What is wrong?

25 views
Skip to first unread message

Aleksandar

unread,
Jan 25, 2019, 6:48:31 AM1/25/19
to AdWords API and Google Ads API Forum
Hi

I am trying to send a link invite from our test MCC to a test customer account. 

I figured out a way to list all pending invitations with that test MCC, so my code is at least partially functional. 

But when I try to add a link invitation I get the following error:

[RangeError.TOO_LOW @ operations[0].operand.clientCustomerId.id, RangeError.TOO_LOW @ operations[0].operand.managerCustomerId.id]

This is the code:

        $mcs = $this->adWordsService->getService(ManagedCustomerService::class, $mccId);


        $link
= new ManagedCustomerLink();
        $link
->setManagerCustomerId($mccId);
        $link
->setClientCustomerId($clientId);
        $link
->setLinkStatus(LinkStatus::PENDING);


        $linkop
= new LinkOperation();    
        $linkop
->setOperator(Operator::ADD);
        $linkop
->setOperand($link);


        $operations
= array($linkop);

        print_r
($operations);
       
        $result
= $mcs->mutateLink($operations);

        print_r
($result);

The operations array looks like this: 

Array
(
   
[0] => Google\AdsApi\AdWords\v201809\mcm\LinkOperation Object
       
(
           
[operand:protected] => Google\AdsApi\AdWords\v201809\mcm\ManagedCustomerLink Object
               
(
                   
[managerCustomerId:protected] => 897-646-0211
                   
[clientCustomerId:protected] => 279-235-3443
                   
[linkStatus:protected] => PENDING
                   
[pendingDescriptiveName:protected] =>
                   
[isHidden:protected] =>
               
)


           
[operator:protected] => ADD
           
[OperationType:protected] =>
           
[parameterMap:Google\AdsApi\AdWords\v201809\cm\Operation:private] => Array
               
(
                   
[Operation.Type] => OperationType
               
)


       
)


)

It looks correct to me, so what is wrong here?

googleadsapi...@google.com

unread,
Jan 25, 2019, 1:41:59 PM1/25/19
to AdWords API and Google Ads API Forum
Hello Aleksandar, 

The RangeError.TOO_LOW means that the value is too low than the minimum allowed for this field. This error occurs mostly when we do not specify an ID, which results in a value of 0 being passed in. Could you please enable logging and share with us the API SOAP logs, so I can take a look? You can reply back via Reply privately to author option. 

Regards,
Bharani, AdWords API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

Aleksandar

unread,
Jan 25, 2019, 2:45:00 PM1/25/19
to AdWords API and Google Ads API Forum
I figured out the issue.

I had dashes in the account IDs. Once I removed the dashes the operation went through. 

Regards
Aleks
Reply all
Reply to author
Forward
0 new messages