Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title></title>
- <meta name="description" content="">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <script runat="server">
- Platform.Load("Core","1.1.1");
- try {
- </script>
- %%[
- Var @body, @callstatus, @response<br>
- Set @body = '{<br>
- "grant_type":"password",<br>
- "clientId":"Id",<br>
- "clientSecret":"****",<br>
- "username":"test@email",<br>
- "password":"MyPassword12345"<br>
- }'<br>
- HTTPPost2("https://login.salesforce.com/services/oauth2/token", "application/x-www-form-urlencoded", @body, True, @callstatus, @response)<br>
- ]%% <br>
- <script type="text/javascript" runat="server">
- } catch (e) {
- Write(Stringify(e));
- }
- </script><br>
- Call:%%=v(@callstatus)=%%<br>
- Res:%%=v(@response)=%%
- </head>
- <body>
- </body>
- </html>
- {"message":"The function expression is invalid. See inner exception for detail.rn <br>
- Script: HTTPPost2("https://login.salesforce.com/services/oauth2/token", "application/x-www-form-urlencoded", @body, True, @callstatus, @response)rn<br>
- Index: 1098rn<br> ListID: 0rn" ,<br>
- "description":"ExactTaOMM.InvalidScriptException: The function expression is invalid. See inner exception for detail.rn<br>
- Script: HTTPPost2("https://login.salesforce.com/services/oauth2/token", "application/x-www-form-urlencoded", @body, True, @callstatus, @response)rn
- Index: 1098rn ListID: 0rn <br>
- Error Code: OMM_FUNC_EXPR_INVALIDrn<br>
- - from Jint --> rnrn<br>
- --- inner exception 1---rnrnExactTarget.OMM.FunctionExecutionException: An error occurred when attempting to evaluate a HTTPPost2 function call. See inner exception for details.rn<br>
- Error Code: OMM_FUNC_EXEC_ERRORrn - from OMMCommon --> rnrn<br>
- --- inner exception 2---rnrnSystem.Net.WebException: The remote server returned an error: (400) Bad Request. - from Systemrnrnrnrnrnrn"} <br>
- Call: Res:
Add Comment
Please, Sign In to add comment