Triggering a campaign using REST API & custom token returns 611 - System error | Community
Skip to main content
New Participant
September 13, 2021
Question

Triggering a campaign using REST API & custom token returns 611 - System error

  • September 13, 2021
  • 2 replies
  • 3105 views

Hi Community,

 

So I am trying to trigger a campaign using the REST API. The guide that I am following it this: https://developers.marketo.com/rest-api/assets/transactional-email/ 

 

I managed to get Marketo to send a test email by POSTing to "/rest/v1/campaigns/${id}/trigger.json", but when I include "tokens" in the post request, I get  611 - System error.

 

To illustrate, this works fine, (email is received etc.):

 

Request: url: '/rest/v1/campaigns/8304/trigger.json', method: 'post', data: '{"input":{"leads":[{"id":4889879}],"tokens":[]}}', headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json;charset=utf-8', Authorization: 'Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXX', 'User-Agent': 'axios/0.21.1', 'Content-Length': 48 } Response: { "requestId": "2f0e#17bde6445ee", "result": [ { "id": 8304 } ], "success": true }

 

 

This doesn't work:

 

Request: url: '/rest/v1/campaigns/8304/trigger.json', method: 'post', data: '{"input":{"leads":[{"id":4889879}],"tokens":[{"name":"{{my.someToken}}","value":"http://www.somedomain.com/XXXXXX"}]}}', headers: { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/json;charset=utf-8', Authorization: 'Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXX', 'User-Agent': 'axios/0.21.1', 'Content-Length': 123 }, Response: { "requestId": "1fc#17bde665d98", "success": false, "errors": [ { "code": "611", "message": "System error" } ] }

 

 

I made sure that the token is added to the Program and email template.

 

 

 

 

 

Things that I have tried so far

  • Giving the API user all available permissions
  • Adding custom token on different levels, such as on the folder level.

 

Any ideas? Thank you in advance for your help.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

New Participant
September 21, 2021

Posting an update on the resolution of this issue. Marketo tech support helped us to figure out the issue.

 

When triggering a campaign using the REST API, while specifying one or more tokens; the program that is being triggered (purple mailbox icon) can not be nested in another program (brown briefcase icon). It must be directly under a folder.

 

Marketo, being a legacy application it has many quirks. This is one of them.

 

FYI: @sanfordwhiteman 

SanfordWhiteman
New Participant
September 13, 2021

I’m not able to repro this with your exact config (same {{my.token}} value, requestable campaign, JSON payload).

New Participant
September 14, 2021

@sanfordwhiteman Thanks for spending time on this. Do you know if there is a way of getting more useful / descriptive error message, in order to better understand where the fault is?

SanfordWhiteman
New Participant
September 14, 2021

Do you know if there is a way of getting more useful / descriptive error message, in order to better understand where the fault is?

Not for this case. I’d be happy to look at it with you offline to figure it out, but there’s a tradeoff: you have to change your Community username to something representing you or your company. We try to have non-snarky usernames. 🙂