How can I tell if I can grab tokens from a folder? | Community
Skip to main content
January 16, 2018
Solved

How can I tell if I can grab tokens from a folder?

  • January 16, 2018
  • 1 reply
  • 2735 views

Hi there,

I'm digging into Marketo Asset database rest API. When I'm looking into Tokens endpoint, I noticed that the endpoint is in the format of:

GET /rest/asset/v1/folder/416/tokens.json?folderType=Folder or Program

So I first tried to retrieve all folders through:

GET /rest/asset/v1/folder/{id}.json?type=Folder

and grab some folder IDs there.

However, I see some of the responses shows an empty array of tokens for the specified folder, some return an error message like the following:

{

    "requestId": "15120#160fcb71012",

    "success": false,

    "errors": [

        {

            "code": "709",

            "message": "50 Folder not found"

        }

    ]

}

I'm pretty sure the folder id exists because I copied it from 'Folders'

So does anyone know why the folder was not found?

Thanks,

Jerry.

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 SanfordWhiteman

I'm talking about Lead database (i.e. "People" in the UI after the recent naming changes) vs. Marketing Activities ("Marketing Activities" in the UI).

"Asset database" is too vague a term here.

To get folders from the Marketing Activities root, you want to set root=3.

1 reply

SanfordWhiteman
Level 10
January 16, 2018

You're probably trying to read tokens from folders under Lead Database (as opposed to under Marketing Activities). The former can't have tokens, and even if the folder exists you'll see

     <id> Folder not found.

January 16, 2018

I see, thanks for the reply. So then how can I tell if the folder is from lead database or asset database? Is there a way to grab all folders from asset database only?

From what I know the folder endpoint is under asset database (at least in the api doc) : http://developers.marketo.com/rest-api/assets/

Thanks,

Jerry.

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
January 16, 2018

I'm talking about Lead database (i.e. "People" in the UI after the recent naming changes) vs. Marketing Activities ("Marketing Activities" in the UI).

"Asset database" is too vague a term here.

To get folders from the Marketing Activities root, you want to set root=3.