REST API "Create Token" returns error 701 | Community
Skip to main content
March 31, 2015
Solved

REST API "Create Token" returns error 701

  • March 31, 2015
  • 5 replies
  • 2555 views
Hi all

I tried to call "Create Token", but returns error 701.
My app is referencing api doc.
http://developers.marketo.com/documentation/asset-api/create-token/

My Request (same as Example)
/asset/v1/folder/{id}/tokens.json

My Request Body (same as Example)
{
  "name": "sample",
  "value": "value",
  "type": "text"
}

My Response
{"success":false,"warnings":[],"errors":[{"message":"name cannot be null.","code":"701"},{"message":"type cannot be null.","code":"701"},{"message":"value cannot be null.","code":"701"}],"requestId":"9999999999"}

I checked forder id is correct via "Get Folder by Id" api.
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
I received the answer from marketo support.
The API document is incorrect.

5 replies

Accepted solution
April 20, 2015
I received the answer from marketo support.
The API document is incorrect.
May 11, 2015
I'm having the same problem. What was the correct way to do this?

Thanks.
 
May 12, 2015
Hi Jon

I looked the API doc today, Example was changed.
Example Request
/rest/asset/v1/folder/10235/tokens.json?type=date&name=MerryChristmas&value=2015-12-25
 
Using quary parameter is correct as this example.
We have to miss JSON request example.
I think below example part is not needed for API reference.
Example Request Body
  1. {
  2. "name": "sample",
  3. "value": "value",
  4. "type": "text"
  5. }
May 12, 2015

Ah - ok - thank you.

And its a GET, not a POST.

Jon.
 
May 12, 2015

Aah! No - Ignore that - it is a POST service. The GET service ignores the parameters and returns current values.

Jon.