SOLVED

REST API "Create Token" returns error 701

Go to solution
Anonymous
Not applicable

REST API "Create Token" returns error 701

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.
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: REST API "Create Token" returns error 701

I received the answer from marketo support.
The API document is incorrect.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Re: REST API "Create Token" returns error 701

I received the answer from marketo support.
The API document is incorrect.
Anonymous
Not applicable

Re: REST API "Create Token" returns error 701

I'm having the same problem. What was the correct way to do this?

Thanks.
 
Anonymous
Not applicable

Re: REST API "Create Token" returns error 701

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. }
Anonymous
Not applicable

Re: REST API "Create Token" returns error 701


Ah - ok - thank you.

And its a GET, not a POST.

Jon.
 
Anonymous
Not applicable

Re: REST API "Create Token" returns error 701


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

Jon.