2

The question is how to enforce journey builder to send callouts with custom header? I have to add custom header to each request(save, validate, publish and execute), that will be sent from the journey builder.

In config.json, for each callout(execute, validate, publish and save), there is the option to add custom header to the callout. Am I right? But I can't find examples, how it use.

This one doesn't work:

"validate": {
   "url": "https://www.example.com/endpoint", 
   "headers": [ 
        { 
             "Authorization" : "Bearer <some bearer>"
        } 
   ],
}

Could you share the example? Because it's not clear for me, how to "pass it as a string data type". Header contain key and value and what delimiter should be between them. "headers": "Authorization : Bearer <some bearer>"?

Thank you for your response!

1
  • Please reopen this as this is not out of the scope of the site! This is a Marketing cloud query and we have a lot of knowledge on this forum! Feb 11 at 22:20
0

The syntax you mentioned above seems wrong. You can look at this page for the correctly syntax.

You need to pass it as a string data type as shown in the example

{
    "key": "rest-1", 
    "name": "My Rest Activity",
    "type": "Rest",
    "metaData": {
        "flowDisplayName":"myFlow" // Displayed in the UI
    },
    "outcomes": [
        {
            "key": "rest-1-outcome-1",
            "next": "<key of next activity>"
        }
    ],
    "configurationArguments": {
        "applicationExtensionKey": "<app-extension-key>",
        "save": {
            "url": "https://www.example.com/endpoint",
            "useJwt": false,
            "timeout": 3000,
            "headers": "https://www.example.com/endpoint",
            "body":"Hello"
        },
        "validate": {
            "url": "https://www.example.com/endpoint",
            "useJwt": false,
            "timeout": 3000,
            "headers": "https://www.example.com/endpoint",
            "body":"Hello"
        },
        "publish": {
            "url": "https://www.example.com/endpoint",
            "useJwt": false,
            "timeout": 3000,
            "headers": "https://www.example.com/endpoint",
            "body":"Hello"  
        }
    },
    "arguments": {      
        "execute": {
            "url": "https://www.example.com/endpoint",
            "headers": "",
            "inArguments": [{
                 "myArgument":""
             }],
            "body":"Hello . This field kept for backward compatibility.", // notice the Data Binding
            "method": "POST",
            "useJwt": true,
            "timeout": 3000
        }
    }
}
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.