cancel
Showing results for 
Search instead for 
Did you mean: 

Add parameters from REST API to HTTP Request body in REST Adapter SAP PO 7.5

Former Member
0 Kudos

Hi Guys,

I am trying to integrate the third party service provider(Twilio) to SAP PO for sending SMS/MMS. Twilio gave me the REST API POST link "https://www.twilio.com/docs/sms/send-messages". I am able to test the REST API in SOAPUI tool successfully by providing the parameter(Body, From, To) values in request and enabling "Post Query String"(Media Type as "application/x-www-form-urlencoded") check box.

Now when I try to do the same using REST adapter in SAP PO 7.5 I am getting errors. Attached the screen shots for the REST adapter configuration and error.

Twilio response for the error is as follows,

The correct URL is:
https://{account_SID}:{auth_token}@api.twilio.com/2010-04-01/Accounts/ACxxxxxxxxxxxxxxxxx/Messages
and these API parameters need to be moved to the HTTP request body:Body=Test&From=+1XXXXXXXXXX&To=+1XXXXXXXXXX
Including the API parameters in the URL looks like it should work, but Twilio does not support this.  The API parameters must be in the HTTP request body.
So you would need to find some way to specify the API parameters in the HTTP request body.

My question is how to add the parameters value to the Request body? This is the URI I am trying to pass with parameters

https://{account_SID}:{auth_token}@api.twilio.com/2010-04-01/Accounts/ACxxxxxxxxxxxxxxxxx/Messages?B...

message-monitor.jpgrest-adapter-0.jpgrest-adapter-1.jpgrest-adapter-2.jpgrest-adapter-3.jpgrest-adapter-4.jpgrest-adapter-5.jpg

Thanks in advance,

RV

former_member607993
Contributor
0 Kudos

Hello RV R,

Did you get chance to solve this?

Please revert.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Guys,

Any help is highly appreciable.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi RV,

The error means that you need to send "Body=Test&From=+1xxxxxxxxxx&To=+1xxxxxxxxxx" as part of the payload and not as part of the HTTP Header.

Regards,

Mark

shadow
Participant
0 Kudos

Hi,

Is your issue resolved ? We have same requirement and can you please help with solution.

Thanks.