SOLVED

Request Campaign - Access denied

Go to solution
Anonymous
Not applicable

Request Campaign - Access denied

For some reason I am getting "access denied" when I try to run this call.  I created the trigger to allow this to happen(campaign in requested -> web service api). Does anybody have any ideas?

Thanks,
 

Dan

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Kenny_Elkington
Marketo Employee

Re: Request Campaign - Access denied

Hey Daniel,

This is an API user permissions error: Authentication is successful but user doesn't have sufficient permission to call this API.  This means that the User which was provisioned for your use does not have sufficient permissions to perform the request, so it may be that you do not have access to those workspaces, or do not have read-write Lead permissions for the user role.

You are correct about the intended behavior of the call.

View solution in original post

5 REPLIES 5
Kenny_Elkington
Marketo Employee

Re: Request Campaign - Access denied

Hi Dan,

Would you be able to provide an example request and full response of your requestCampaign call?
Anonymous
Not applicable

Re: Request Campaign - Access denied

Hi Kenny,

Here is the code that I am using:

$service_url4 = "https://976-WNO-299.mktorest.com/rest/v1/campaigns/2645/trigger.json?access_token=***********";
$data = array('input' => array('leads' => array(array('id' => '2387'))  ) );
 
 
$options = array(
    'http' => array(
        'method'  => 'POST',
        'content' => json_encode($data),
        'header'=> "Content-Type: application/json\r\n" .
               "Accept: application/json\r\n"
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($service_url4, false, $context);

The result gives me the following:

{"requestId":"4437#1475aab957d","success":false,"errors":[{"code":"603","message":"Access denied"}]}

Thanks!

Dan
Anonymous
Not applicable

Re: Request Campaign - Access denied

Its possible that I might not be understanding what this call actually does...

My guess is that it adds a lead to the specified campaign.  Am I correct in this assumption?

Thanks,

 

Dan

Kenny_Elkington
Marketo Employee

Re: Request Campaign - Access denied

Hey Daniel,

This is an API user permissions error: Authentication is successful but user doesn't have sufficient permission to call this API.  This means that the User which was provisioned for your use does not have sufficient permissions to perform the request, so it may be that you do not have access to those workspaces, or do not have read-write Lead permissions for the user role.

You are correct about the intended behavior of the call.
Anonymous
Not applicable

Re: Request Campaign - Access denied

Thanks Kenny!  This seems to work.  I have another question but I will ask in a different thread to keep on topic.
 

Thanks,
 

Dan