Skip to Content
0
Aug 28, 2017 at 11:55 AM

REST Receiver Adapter POST Method

6766 Views Last edit Aug 29, 2017 at 05:27 AM 3 rev

Hi SAPiens,

I am trying to integrate SAP PI with SFDC (REST Service).

I am trying with REST Receiver adapter for LOOKUP and get ACCESS_TOKEN in response.

But my receiver channel is showing BAD requet 400.

I am using below URL under URL pattern -

https://xxxxxxx.my.salesforce.com/services/oauth2/token?grant_type=password&client_id=xxxxxxxxxxx&client_secret=xxxxxxxxx&username=xxxxx@xxx.com.xxx&password=xxxx

Error Log -


Error when calling an adapter by using the communication channel CC_RCVR_SFDC_REST_LOOKUP (Party: , Service: BC_SFDC, Object ID: 25f71318dbba3381bcf077849c698519) XI AF API call failed. Module exception: (No information available). Cause Exception: 'HTTP POST call to https://xxxxx.my.salesforce.com/services/oauth2/token?grant_type="password"+client_id="xxxxxxxxxxxxxxxxxxxxxxxxxxx"+client_secret="xxxxxxxxxxxxxxxxxxx"+username=xxxxxxxx@xxxxxx"+password="xxxxxxxxx" not successful. HTTP/1.1 400 Bad Request'.

In HTTP operations I have selected manual value = POST.

Why I am getting this error?

BR,

Rashmi