Juliën
Juliën

Reputation: 9552

Marketo "Import Lead" fails with error 610 Requested resource not found

I'm trying to batch update a bunch of existing records through Marketo's REST API. According to the documentation, the Import Lead function seems to be ideal for this.

In short, I'm getting the error "610 Resource Not Found" upon using the curl sample from the documentation. Here are some steps I've taken.

  1. Fetching the auth_token is not a problem:
$ curl "https://<identity_path>/identity/oauth/token?
    grant_type=client_credentials&client_id=<my_client_id>
    &client_secret=<my_client_secret>"
  1. Proving the token is valid, fetching a single lead isn't a problem as well:
# Fetch the record - outputs just fine
$ curl "https://<rest_path>/rest/v1/lead/1.json?access_token=<access_token>"

# output:
{
  "requestId": "ab9d#12345abc45",
  "result": [
    {
      "id": 1,
      "updatedAt": "2014-09-18T13:00:00+0000",
      "lastName": "Potter",
      "email": "[email protected]",
      "createdAt": "2014-09-18T12:00:00+0000",
      "firstName": "Harry"
    }
  ],
  "success": true
}
  1. Now here's the pain, when I try to upload a CSV file using the Import Lead function. Like so:
# "Import Lead" function
$ curl -i -F format=csv -F [email protected] -F access_token=<access_token> 
    "https://<rest_path>/rest/bulk/v1/leads.json"

# results in the following error
{
  "requestId": "f2b6#14888a7385a",
  "success": false,
  "errors": [
    {
      "code": "610",
      "message": "Requested resource not found"
    }
  ]
}

The error codes documentation only states Requested resource not found, nothing else. So my question is: what is causing the 610 error code - and how can I fix it?

Further steps I've tried, with no success:

Any tips or suggestions?

Upvotes: 4

Views: 2129

Answers (2)

Keshavram Kuduwa
Keshavram Kuduwa

Reputation: 1060

I went through the same trouble, just want to share some points that help resolve my problem.

  • Bulk API endpoints are not prefixed with ‘/rest’ like other endpoints.
  • Bulk Import uses the same permissions model as the Marketo REST API and does not require any additional special permissions in order to use, though specific permissions are required for each set of endpoints.
  • As @Ethan Herdrick suggested, the endpoints in the documentation are sometimes prefixed with an extra /rest, make sure to remove that.

If you're a beginner and need step-by-step instructions to set up permissions for Marketo REST API: Quick Start Guide for Marketo REST API

Upvotes: 0

Ethan Herdrick
Ethan Herdrick

Reputation: 303

Error code 610 can represent something akin to a '404' for urls under the REST endpoint, i.e. your rest_path. I'm guessing this is why you are getting that '404': Marketo's docs show REST paths as starting with '/rest', yet their rest endpoint ends with /rest, so if you follow their directions you get an url like, xxxx.mktorest.com/rest/rest/v1/lead/..., i.e. with '/rest' twice. This is not correct. Your url must have only one 'rest/'.

Upvotes: 3

Related Questions