SOLVED

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

Go to solution
Anonymous
Not applicable

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

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\"] "

    }

  ]

}

1 ACCEPTED SOLUTION

Accepted Solutions
Kenny_Elkington
Marketo Employee

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

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

View solution in original post

3 REPLIES 3
Kenny_Elkington
Marketo Employee

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

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
Marketo Employee

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

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

Anonymous
Not applicable

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

Thank you for clearing that up