-1

Can someone help me identify the syntax error that I am making in the HttpPost call below. Help is appreciated. This is the log that I could request from the marketing cloud support team

ExactTarget.OMM.InvalidScriptException: An error occurred when attempting to resolve a function call. See inner exception for detail. Function Call:

HTTPPost2('https://ri.dd.igee.net/v1/consumer/interaction','application/json','{"interaction_type": "SMS", "interaction_source": "MARKETING_CLOUD", "interaction_subject": "VALIDATION_REQUESTED", "interaction_brand_family": "aa", "member_id": "833", "interaction": { "person_id": "833", "channel": "SMS", "mobile_number": "14804544447" }}',false,'status','response','["Authorization", "API-Version", "API-Key"]','["Bearer wwweewewew227eu4wNpgX", "v3", "QkU0QjR324523452354gefgsdfvdftRDFFRUVCQTNCQ0Ez"]')

Index: 593 Content Type: Text Substitution Level: Subscriber Message Context: SMS Error Code: OMM_SCRIPT_SYNTAX_ERR - from OMMCommon --> --- inner exception 2--- ExactTarget.OMM.InvalidFunctionException: Invalid characters appear at the end of the parameter value

1

You need to use other quotes inside the json than you use for the string or you need to escape them.

HTTPPost2('https://ri.dd.igee.net/v1/consumer/interaction','application/json','{"interaction_type": "SMS", "interaction_source": "MARKETING_CLOUD", "interaction_subject": "VALIDATION_REQUESTED", "interaction_brand_family": "aa", "member_id": "833", "interaction": {"person_id": "833", "channel": "SMS", "mobile_number": "14804544447"}}',false,'status','response','["Authorization", "API-Version", "API-Key"]','["Bearer wwweewewew227eu4wNpgX", "v3", "QkU0QjR324523452354gefgsdfvdftRDFFRUVCQTNCQ0Ez"]')

  • Thanks for you input Markus. I tried using the other quotes as you suggested and still have the same error. – user1100023 Dec 20 '16 at 2:54
  • I suppose the format of the header names and values could be wrong, but in the marketing cloud documentation I couldn't find anything on the format of these two parameters and I've never used them before. Maybe the headers are just a comma/semicolon/space separated list? – Markus Slabina Dec 20 '16 at 9:14
0

Each additional header should be formatted in a comma separated fashion and your status and response are variable that you can then print or use... I made adjustments to you code below:

HTTPPost2('https://ri.dd.igee.net/v1/consumer/interaction','application/json','{"interaction_type": "SMS", "interaction_source": "MARKETING_CLOUD", "interaction_subject": "VALIDATION_REQUESTED", "interaction_brand_family": "aa", "member_id": "833", "interaction": { "person_id": "833", "channel": "SMS", "mobile_number": "14804544447" }}',false,@status,@response,'Authorization', 'Bearer wwweewewew227eu4wNpgX', 'API-Version', 'v3', 'API-Key', 'QkU0QjR324523452354gefgsdfvdftRDFFRUVCQTNCQ0Ez')

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.