Receiving 601 Error Code When Trying to Authenticate to Marketo Web Service in Medallia | Community
Skip to main content
New Participant
March 16, 2021
Solved

Receiving 601 Error Code When Trying to Authenticate to Marketo Web Service in Medallia

  • March 16, 2021
  • 1 reply
  • 7458 views

Hello,

I am currently working on a project where we are attempting to integrate Marketo with Medallia (I am configuring this integration on the Medallia side and have minimal experience with Marketo). The way this integration works is that Leads and associated data fields are sent in a sample file that is processed in Medallia and Medallia generates survey links that are sent back to Marketo. So far, we have been able to successfully send a Sample File from Marketo to Medallia, but sending survey link data back to Marketo has been challenging.

The Marketo team that I'm working with has configured a web service and sent us a Client ID and Client Secret that we are using to authenticate to the Marketo identity server and subsequently submit an HTTP POST request to the web service. Medallia has a functionality where I am able to test logging in to the identity server using the OAuth credentials that I was given by the Marketo team (I'm assuming this functionality works by testing the ability to retrieve an access token with cURL commands) and I'm able to do so successfully. However, when I actually try to execute a POST request to Marketo, I receive a 601 error from Marketo in the response.

Our Medallia setup is configured to authenticate to Marketo with the following information (any client specific/senstive information I'm redacting and note that the <<>> is not actually contained in any of our information that we are sending to Marketo):

For authenticating:

Login URL: <<token server URL>>.mktorest.com/identity/oauth/token

Login Headers:

  • client_id: <<client ID provided to us>>
  • client_secret: <<client secret provided to us>>
  • grant_type: client_credentials

For making the POST request:

Request URL: <<endpoint URL>>mktorest.com/rest/v1/leads.json?fields=<<comma separated list of Marketo IDs of fields we are sending over>>

Request Method: POST

Request Headers:

  • Authorization: Bearer <<token>> (whatever token we receive from the login will be what is piped in for <<token>>)
  • Accept-Encoding: gzip, deflate
  • Content-Type: application/json; charset=utf-8

Content: We have a JSON payload that is being sent over with each request.

Does anyone have some insights regarding why I may be receiving the 601 error (issues with Medallia configuration and how we're making the request? Potential issues with the Marketo configuration that I can communicate to the Marketo team?)? Thanks.

Best answer by SanfordWhiteman

This is an example of a payload included in a request we sent over for which we received a 609 error. I'm redacting the exact survey URLs since this is a public forum and if someone were to complete the surveys the response would be recorded in our instance:

[{"id":"293746184","zCSMedalliaURL":"survey.medallia.com/?<<alphanumeric characters>>","zCSMedalliaOptOutURL":"survey.medallia.com/?<<alphanumeric characters>>&reject=yes"}]

 


A Sync Lead request can't be that simple, it looks like this:

{ "action" : "updateOnly", "lookupField" : "id", "input" : [ { "id" : "293746184", "zCSMedalliaURL" : "survey.medallia.com/?<<alphanumeric characters>>", "zCSMedalliaOptOutURL" : "survey.medallia.com/?<<alphanumeric characters>>&reject=yes" } ] }

1 reply

SanfordWhiteman
New Participant
March 16, 2021

The fields query param isn't relevant to this POST request. But that's not causing your error.

 

I suspect the way you're creating the auth header is actually off, like you're adding extra whitespace or there's some variable scope issue that makes the access_token empty. Would have to see an actual request.

 


... where I am able to test logging in to the identity server using the OAuth credentials that I was given by the Marketo team (I'm assuming this functionality works by testing the ability to retrieve an access token with cURL commands) and I'm able to do so successfully.

Hmm, wouldn't assume a server is using a particular HTTP library unless you're basing that on something in particular!

 

GThomsonAuthor
New Participant
March 16, 2021

Hi Sanford,

Thanks for your help, I really appreciate it and it finally feels like things are starting to head in the right direction.

I was able to rework how I have things set up in Medallia to submit the HTTP POST request with JavaScript headers to pass the token and it seems like I'm getting closer. With this set up, I can see that Medallia submitted a log in request to Marketo, Marketo responded with an access token (which I didn't see previously and may shed some light on why I was receiving the 601 error), and then Medallia submitted the HTTP POST Request.

This time, Marketo responded with a 609 error with the message "Invalid JSON. Cannot deserialize instance of 'com.marketo.mapi.webapp.entities.json.SyncLeadRequest' out of START_ARRAY token\n at [Source: (PushbackInputStream); line: 1, column: 1]". Do you have any insights regarding why I may be receiving this error now?

SanfordWhiteman
New Participant
March 16, 2021

This time, Marketo responded with a 609 error with the message "Invalid JSON. Cannot deserialize instance of 'com.marketo.mapi.webapp.entities.json.SyncLeadRequest' out of START_ARRAY token\n at [Source: (PushbackInputStream); line: 1, column: 1]". Do you have any insights regarding why I may be receiving this error now?

What's the exact JSON payload that's being sent? That error is always accurate in my experience, that is, it's bad JSON.