Shiva N (SHIVA2010)

SHIVA2010 Member since 2012 24 posts
Posted: October 15, 2015
Last activity: October 4, 2018
Posted: 15 Oct 2015 9:08 EDT
Last activity: 4 Oct 2018 11:08 EDT

Calling a Salesforce REST service from Pega


I have requirement to call a SalesForce REST service from pega. for this first i have tried to do that in Post man tool and am able to call the REST Service. So i am doing 2 service calls. first service call is to get the access token(sending grant_type,client_id,client_secret,username,password as form data. Link:https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_username_password_oauth_flow.htm) and the other service is to call the actual REST service using the access token.

In Pega, i am trying with 2 approaches.

First i tried to use the OAuth authentication type in the Connector. Followed your post in the below link.


1. Created the Oauth data instance.

2. Referred this Oauth name in Authentication profile and referred the authentication profile in connctor rule where i am trying to call actuall REST service.
This approach is failing in activity pyConnectOAuthProvider at step2. It is tring open "Data-Admin-Security-OAuth-Client-AccessToken" instance using consumer key and operator id.


I am trying to send the grant_type,client_id,client_secret,username,password in body. As the REST service is expecting these parameters as form data, i am not sure how to pass as form data. So i tried sending these parames separated by & in the Message body.

Ex: grant_type=password&client_id=

This giving me the below response.

"error": "unsupported_grant_type",
"error_description": "grant type not supported"

Please suggest me.

**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.

Data Integration
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Discussion, please write a new Discussion.