Program Tokens & Rest API's Create / Delete Token | Community
Skip to main content
October 25, 2016
Question

Program Tokens & Rest API's Create / Delete Token

  • October 25, 2016
  • 1 reply
  • 3526 views

Question. When I create a new program, I select from one of the following types:

  • Default
  • Engagement
  • Email
  • Event

Are these programs "folders" in the context of the API?

I'm trying to run a script outside Marketo that will create or delete a token within a specific program and want to know whether the four digit number (app-ab08.marketo.com/#AAADDDDAD) associated with the program, the one that's represented by the {{program.id}} token, is the same one represented by {id} in the following operations associated with creating or deleting tokens:

  • /rest/asset/v1/folder/{id}/tokens.json (See here.)
  • /rest/asset/v1/folder/{id}/tokens/delete.json (See here.)

I'm trying to create or delete tokens based on a series of conditions evaluated outside Marketo.

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

1 reply

Ben_Griffith1
Level 3
October 25, 2016

tokens can be setup for a folder or a program.  The calls you referenced can include a parameter, specifying what the id is for (program or folder): ?folderType=Program

October 26, 2016

Thanks, Ben!

Just to clarify, I want the calls to be triggered by a webhook run from the program itself, and am looking for the simplest way to pass all the information about which program the webhook was called from each time. Assuming I clone a template program each time, that parameter (?folderType=Program) could be the same each time. When paired with the four digit ID provided by using {{program.id}}, and assuming the names of the tokens to be deleted or created are known, is that sufficient information for the call to target the program and create/delete tokens within that program?

One more question. Is the four digit {{program.id}} absolutely unique within our instance? I had assumed yes, since that's all that appeared as part of the {{program.id}} when I tested, but I noticed that the program ID that appears in the URL when I'm viewing an asset also includes some sort of short code communicating the type of asset and two characters that follow the number, which I don't know the significance of: #ME4293A1.

  • ME = Event?
  • A1= ?
October 27, 2016

Suffix is

A1=1st Tab

B2=2nd Tab

C3=3rd Tab

D4=4th Tab