Getting "Invalid token value" result when using the rest api to request a campaign | Community
Skip to main content
September 15, 2015
Solved

Getting "Invalid token value" result when using the rest api to request a campaign

  • September 15, 2015
  • 1 reply
  • 2612 views

Hello,

I need to preface this with the fact that we are new to Marketo. So all help is greatly appreciated.

Using the REST API to request a campaign, I can't send tokens with the request.  We want a campaign to change a value in a lead.

Every response comes back with a "Invalid token value" error message and the fields exist in our system.

Thank you in advance for any help that can be provided.

-Matt

Here's our request:

{

    "input": {

        "leads": [{

            "id": "1111111"

        }],

        "tokens": [{

            "name": "{{lead.utm_source}}",

            "value": "Source"

        }, {

            "name": "{{lead.utm_medium}}",

            "value": "Medium"

        }]

    }

}

And here's he response:

{

  "requestId": "e81a#14fd280097b",

  "success": false,

  "errors": [

    {

      "code": "1003",

      "message": "Invalid token value: [\"lead.utm_source\",\"lead.utm_medium\"] "

    }

  ]

}

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 Kenny_Elkington

I just checked the doc and realized that this was not made clear.  I'll update it.

1 reply

Kenny_Elkington
Adobe Employee
Adobe Employee
September 15, 2015

You can only replace My tokens local to a program or folder.  Lead tokens always pull the value dynamically from the lead record being processed.

Kenny_Elkington
Adobe Employee
Kenny_ElkingtonAdobe EmployeeAccepted solution
Adobe Employee
September 15, 2015

I just checked the doc and realized that this was not made clear.  I'll update it.

September 15, 2015

Thank you for clearing that up