Receiving "Access Denied" for most API calls | Community
Skip to main content
February 26, 2016
Solved

Receiving "Access Denied" for most API calls

  • February 26, 2016
  • 1 reply
  • 9894 views

I have a custom Service and am attempting to make REST API calls to retrieve activities. In doing so, I am getting nothing but "Access Denied" errors such as:

{"requestId":<...>,"success":false,"errors":[{"code":"603","message":"Access denied"}]}

Some background:

My API user is an Admin. I have checked and double checked that the Admin role has all permissions available

Prior to making an API call, I generate a bearer token using the `/identity/oauth/token?grant_type=client_credentials` endpoint.

I have tried the following endpoints and receive the Access Denied error for each call attempt:

  • /rest/v1/activities/pagingtoken.json
  • /rest/v1/lists.json
  • /rest/v1/leads/...
  • /rest/v1/leads/describe.json

The one Endpoint which reliable succeeds is `/rest/v1/stats/errors.json`:

{"requestId":<...>,"result":[{"date":"2016-02-26","total":1,"errors":[{"errorCode":"603","count":1}]}],"success":true}

Are there other permissions that allow my API user to access the specified endpoints? Is there something I'm missing?

Thanks!

Message was edited by: Zack Schultz (Added note about connecting via the identity endpoint first)

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

Here is the getting started guide:  http://developers.marketo.com/blog/quick-start-guide-for-marketo-rest-api/

1 reply

February 26, 2016

You need to authenticate first.  Did you runt he authenticate API call?

February 26, 2016

Yes - I should have mentioned that in my original post. I first hit the authenticate API to get an access token. I then use `Authorization: Bearer <my token>` to authenticate each individual call.

February 26, 2016

I am not sure you need to authenticate each call