02-17-2022 04:37 AM
I am putting together a script in the contact center, which must make queries to an external base by Make rest Call.
I must make a POST to a database so that it brings me a TOCKEN and then when that works, with that token I must validate myself and make a GET to bring me users.
The problem is that I can't make the first POST work, although I put together a stream that I see sends the correct values, on the client side, it tells me that the BODY field arrives empty.
I share the script to see if you can help me.
BODY:
"----WebKitFormBoundary7MA4YWxkTrZu0gW" +System.lineSeparator()+
"Content-Disposition: form-data; name=" + '\"' + "grant_type"+ '\"' +System.lineSeparator()+
System.lineSeparator()+
"password" +System.lineSeparator()+
"----WebKitFormBoundary7MA4YWxkTrZu0gW" +System.lineSeparator()+
"---WebKitFormBoundary7MA4YWxkTrZu0gW" +System.lineSeparator()+
"Content-Disposition: form-data; name=" + '\"' + "client_secret" + '\"' +System.lineSeparator()+
System.lineSeparator()+
"l493T8GYETfpdIf7WXIHIuj0Gb22MGhkts00K4FJ" +System.lineSeparator()+
"----WebKitFormBoundary7MA4YWxkTrZu0gW" +System.lineSeparator()+
"Content-Disposition: form-data; name=" + '\"' + "username" + '\"' +System.lineSeparator()+
System.lineSeparator()+
"bghtechpartner@avalian.com" +System.lineSeparator()+
"----WebKitFormBoundary7MA4YWxkTrZu0gW" + '\"' +System.lineSeparator()+
"Content-Disposition: form-data; name=" + '\"' + "password" + '\"' +System.lineSeparator()+
System.lineSeparator()+
"bghtechpartner@Avalian2021" +System.lineSeparator()+
"----WebKitFormBoundary7MA4YWxkTrZu0gW"
Thank you
02-17-2022 05:11 AM
02-17-2022 05:26 AM
I share the script.
The parameters requested by the client are these:
But on the client side, it tells me that the body field is empty.
What am I doing wrong?
Thanks
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide