Skip to Content

SAP PI REST adapter - Embed access token and refresh token

Hi,

Scenario:

SAP (Proxy) --> PI (REST) --> 3rd party API.

Challenge:

We will be sending XML (abap proxy) to PI, where by means of REST adapter, it will be converted to JSON, further it will hit API. In API documentation, i can see that, in request, input: accesskey, username and password and in output: access token and refresh token. We can specify the username and password in REST adapter itself, but what about the access key and access token and refresh token ? I have never worked with REST before. Pretty confused.

Question: How will the accessKey, accessToken, refershToken sent to API ? Will it be enclosed in JSON request payload? As we are receiving XML from abap proxy, how will PI include these tokens in the payload ?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Aug 07, 2020 at 01:20 AM

    Hi Subin,

    You need to test REST API from postman at first how it works. Postman is a tool by which you can test any API how it works. Yo need to select particular authorization type while posting data to REST API in postman. choose the appropriate one and post data. If you are successful posting data using postman then try with sap po. in po again you will get authorization option where you can use all keys, token etc.

    In SAP PO you will get below option.

    Hope it helps!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.