AnsweredAssumed Answered

REST API to Update Token gives 500 Internal Server if token value too large

Question asked by Western Dental on May 30, 2018
Latest reply on May 30, 2018 by Sanford Whiteman

Using this REST API http://developers.marketo.com/rest-api/assets/tokens/#create_and_update

 

 

 

REST Details:

-------------------

POST /rest/asset/v1/folder/{{programID}}/tokens.json?access_token={{access_token}}&name=office12&type=script+block&folderType=Program&value= HTTP/1.1

Host: {{mktoServer}}

Content-Type: application/x-www-form-urlencoded

Accept: application/json

 

 

 

If I replace {{tokenValue}}  with 'xxx' it works fine, but if I keep adding 'x's it will eventually die.   I can successfully create a token of about 7K characters.  But somewhere above that, within nothing changing but the size of the token value,  Marketo  gives a 500 error: 

 

 

There is no documented size limits for Tokens.  I have been able to create and use tokens entered throught the UI that are 10 times bigger (70K characters) -- so I think the limit is imposed by the API not by a limit with the token value.

 

 

 

Error

--------------------------

<html>

    <head>

        <title>500 Internal Server Error</title>

    </head>

    <body bgcolor="white">

        <center>

            <h1>500 Internal Server Error</h1>

        </center>

        <hr>

        <center>nginx</center>

    </body>

</html>

Outcomes