Skip to main content
January 19, 2017
Question

Identity Service returns unauthorized

  • January 19, 2017
  • 2 replies
  • 1574 views

Brand new to Marketo REST API and I'm having trouble calling the identity service.  I've followed the steps in the documentation, created a role for my API user and assigned a user to that role.  Created a new custom service and copied the client_id and client_secret from the view details.  I've copied the identity service URL and added /oauth/token to the end.  I've checked and double-checked the values in my URL and they match what the admin site says.

My GET call URL looks like this:

<myinstanceid>.mktorest.com/identity/oauth/token?client_id=<myclientid>&client_secret=<myclientsecret>&grant_type=client_credentials

No matter what I try, I continually get a 401 error and the json output:

{

  "error": "unauthorized",

  "error_description": "No client with requested id: <myclientid>"

}

(where the <myclientid> is the actual client_id I passed in the GET call, of course).

I can successfully get a token through the UI and I am able to use cUrl to bulk upload a file of attendees, so I think my account is set up correctly.

How can I debug this issue?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Kenny_Elkington
Adobe Employee
Adobe Employee
January 19, 2017

Are you trying to call this over http instead of https?  That would cause failure, though I don't think it would cause this failure.  Maybe you've gotten prod and sandbox creds mixed up?

January 19, 2017

Thanks for the reply...

I tried http also but that did not even connect.  I only have a developer sandbox. I don't have a production account yet so I don't think it's a mix up in credentials.

January 23, 2017

This turned out to be an issue with the setup of the sandbox and apparently affected multiple users.  After the sandbox setup was fixed, the same call  with the same parameters started working.  I consider this issue closed.