cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1747
Views
0
Helpful
7
Replies

UCCX - SCRIPT- MAKE REST CALL - BODY

pablo.beraldi
Level 1
Level 1
376 / 5.000
 

Resultados de traducción

I am wanting to configure an external query by REST API. To do this, I first tried it with POSTMAN, where the REST API POST that I must perform works correctly. Now I want to dump those parameters into MAKE REST CALL. I think the problem is happening to me because of how I am sending the parameters in the BODY. I did the following before MAKE REST CALL:
 
Use a SET, where I put the values in this way
"grant_type= password&client_id=XXX&client_secret =Secret"
 
Is it correct, or how should I set the parameters that should go in the body?
 
Thanks.
1 Accepted Solution

Accepted Solutions

So you set the string in a parameter for examplve strBody = "grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&assertion=" Then you set strBody in your REST request. Can you validate what the API is receiving? That will make your life a lot easier to figure out what might be going on.

 

david

View solution in original post

7 Replies 7

So you set the string in a parameter for examplve strBody = "grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&assertion=" Then you set strBody in your REST request. Can you validate what the API is receiving? That will make your life a lot easier to figure out what might be going on.

 

david

 

Excuse me,

I'm half bad at this subject of programming things, these are all the parameters that I need to send in the BODY.

This can be done as you told me?

 

2021-12-17 15_08_53-Postman.png

Look at the console of what Postman sends and then replicate that in to a variable in UCCX.

 

david

 

In the consula I see that everything he executes is the following:
 
curl --location --request POST 'https://api-test.examplecom.ar/example/public/oauth/token' \
--form 'grant_type="password"' \
--form 'client_id="324"' \
--form 'client_secret="XXXXX7WXIHIuj0Gb22MGhkts00K4FJ"' \
--form 'username="username@domain.com"' \
--form 'password="password"'
 
But that if I want to create it as a variable, the syntax does not work, surely it has to be converted into UCCX editor format. But I can't find the way yet.
 
Thanks

pablo.beraldi
Level 1
Level 1

I think the problem is in how I am sending the BODY.

I need to send some variables in Form-Data format, how does UCCX accept it in the Make rest Call step?
Thank you

did you find solution for this problem . i am also facing same isssue, need to make Oauth call and in that need to pass body as form data type

 

Hi. Same here. Any Update?  Thank you!