Question
PT Bank Sinarmas Tbk
ID
Last activity: 16 Oct 2018 12:03 EDT
How to create REST Integration with Token Auth
One of Web Service that providing some data when I want to get that, Token must be included or using Authorization. If I Get using Postman, like image that shown below. How to implement on PEGA ? Can anyone help me ? Thank you.
***Updated by moderator: Lochan to add Categories***
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
PT Bank Sinarmas Tbk
ID
In my case, to get data, I have to get token before. So create Rest Integration to get a Token and then create Rest Integration to get data. This is REST Integration to get data.
After created, modify REST like this. Delete parameter {Token} on Resource Path because I will use Token as Header not Parameter.
then, go to Methods tab. Add Auth Header which mapped from Token.
Pegasystems Inc.
US
Are you talking about a call to a service where the first call gets the token and the second one passes it in the header? The response on the first call should map the set-cookie to the clipboard and the second call can add this on the outgoing header.
PT Bank Sinarmas Tbk
ID
Yes Paul, first call gets the Token and then second call gets Data with Token that filled on header.
Evonsys
IN
Hi,
Just want to know are making two calls to the service with the same GET method or is it first time GET method getting the Token as a Response header and then passing this as clipboard Request Header for POST for the 2nd call to the service. We are having an issue with the 2nd time call, it says token is invalid. So we are suspecting that session is expired or it would be executing the 2nd call in new session.
Let me know how are you making multiple calls.
Pegasystems Inc.
IN
I am not sure paul what he meant but if he is speaking about the authentication headers you will have option of headers in parameters tab of the service method and connector so that you can pass them.
PT Bank Sinarmas Tbk
ID
Dear all, the problem has been solved. Thank you.
Randstad Technologies US
US
we have similar scenario..can you explain what you did to resolve this
Accepted Solution
PT Bank Sinarmas Tbk
ID
In my case, to get data, I have to get token before. So create Rest Integration to get a Token and then create Rest Integration to get data. This is REST Integration to get data.
After created, modify REST like this. Delete parameter {Token} on Resource Path because I will use Token as Header not Parameter.
then, go to Methods tab. Add Auth Header which mapped from Token.
-
Mahesh Kharde
asm
ID
Dear yudhi,
I have the same problem as your previous problem,
I have done the rest service testing using postman, and it has worked (like the picture that attach), and now I want to make rest service integration in pega designer studio version 7.1.9. please give me a tutorial for that
asm
ID
Hi,
I want ask about create connector rest integration that have Authorizatio Code.
I have done the rest service testing using postman, and it has worked (like the picture that I attach), and now I want to make rest service integration in pega designer studio version 7.1.9. please give me a tutorial for that
Thank you