Request Campaign - Access denied | Community
Skip to main content
July 21, 2014
Solved

Request Campaign - Access denied

  • July 21, 2014
  • 5 replies
  • 1943 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kenny_Elkington
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.

5 replies

Kenny_Elkington
Adobe Employee
Adobe Employee
July 21, 2014
Hi Dan,

Would you be able to provide an example request and full response of your requestCampaign call?
July 21, 2014
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
July 21, 2014

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
Adobe Employee
Kenny_ElkingtonAdobe EmployeeAccepted solution
Adobe Employee
July 21, 2014
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.
July 22, 2014

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

Thanks,
 

Dan