cancel
Showing results for 
Search instead for 
Did you mean: 

When using REST receiver to connect to 3rd party using POST command - unauthorised error

06-07-2019 1:55 PM
2111 views 3 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi All,


When i'm making a connection to a REST receiver (api that supports rest) i'm sending a test message in the PI Mesmon Test tool to ensure it works. The message passes through the mapping just fine, but when it goes to POST to the REST receiver i get the error: "com.sap.aii.adapter.rest.ejb.common.exception.HttpCallException: HTTP POST call to
https://rest.receiver.address.com/rest/endpoint ... not successful. Unauthorized

I've been able to make the post from Postman, and i've configured my rest receiver adaptor as per postman settings but i'm still getting the unauthorised message:

Here is an example of postman and pi rest adapter & test tool settings/errors:

1.png2.png3.png

A quick response would be appreciated.

Many thanks.

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

manoj_khavatkopp
Active Contributor

Hi George ,

Few observation looking at the screenshot.

  • There is typo mistake for "Authorization" in header section in REST channel. 🙂
  • You don't need to add this header , try removing this header and just define the authentication as Basic and provide credentials , Rest adapter should automatically add this header.

Thanks,

Manoj

Former Member

Thanks 🙂 I really should be more careful !

Answers (1)

Answers (1)

former_member607993
Contributor
0 Likes

Hi George,

Yes, as informed correctly by Manoj, In the Integration Director goto REST Receiver communication channel >HTTP Headers.

The Header Name should be Authorization instead Authorisation. Kindly correct it and Retest.

Thanks and Regards - Rajesh PS