Account is not authorized problem

Participant

Account is not authorized problem

Hi everyone,

 

Currently I have multiple CC accounts and I'm doing a loop through all accounts and schedule a campaign for each. In some accounts I'm getting this error:

"Ctct\Exceptions\CtctException: [{"error_key":"error.http.data.access.forbidden","error_message":"Account is not authorized to schedule a campaign."}] in Ctct\Util\RestClient::httpRequest() (line 93 of /opt/bitnami/apache2/htdocs/sites/bloomnet.drivingretail.com/sites/all/modules/drivingretail_cc/lib/php-sdk-master/src/Ctct/Util/RestClient.php)."

 

so my question is, is there any way I can suppress that error? so even there's that error, it will still continue the loop and finish the rest of the list. 

 

Help will be highly appreciate.

 

Thanks!

1 REPLY 1
Member

Hello,

 

It is possible to specifically suppress a 403 error, but it will require making a temporary modification to the PHP wrapper code. In order to do this, you would need to test $body[0]['error_key'] for the value "error.http.data.access.forbidden" on line 94 of RestClient.php.

 

Let me know if you have any difficulty with this!

 

Sincerely,

Elijah G.
API Support Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page