cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
985
Views
20
Helpful
3
Replies

Rest_Client Authentication methods

piyush aghera
Enthusiast
Enthusiast

Hi All,

 

I am building a CVP call studio application where i need to consume an external REST API.  I could do that using Rest_Client and was successful as well. but want to know more about authentication methods.

So it supports HTTP authentication method, which passes on username/password to REST API for authentication. Does this username/password get encrypted ? Does it support any other methods, like, OAuth1, OAuth2 or token based authentication ?  If so, how does that work, means how do i pass authentication information to REST API ?

Please guide me to a document, blog or support community question which describes this feature.  I tried a lot but could not find such material.

 

I am using Call studio 11.6 with PCCE 11.6 CVP comprehensive call flow.

 

Thank you.

3 Replies 3

david.macias
VIP Advocate VIP Advocate
VIP Advocate

It really depends on the end client you're trying to connect to and how they allow connections. For example, SFDC what we've done is use server to server authentication (https://help.salesforce.com/articleView?id=sf.remoteaccess_oauth_jwt_flow.htm&type=5) with no issues. It's not the best solution but it's more secure than basic auth.

 

david

piyush aghera
Enthusiast
Enthusiast

Thanks David.  Any suggestion about how to use OAuth1.0 with CVP call studio ?

I have below four values and I have to consume REST API with these to authenticate, send request in JSON and receive response.

App key:

Secret: 

Access token: 

Access token secret

 

I can test REST API endpoint from Postman by supplying above values in Authorization section, but not sure how to pass this in CVP call studio as REST_Client element accepts only Header values.  I tried to put these values in header key:value pair as below, but no luck:

 

Authorization: OAuth oauth_consumer_key="xxxx",oauth_consumer_secret="xxxxx",oauth_token="xxxxx",oauth_token_secret="xxxx"

 

Any pointers or code base would be really helpful.

 

Thanks.

david.macias
VIP Advocate VIP Advocate
VIP Advocate

You're going to have to create a custom element, this is a good start for code https://www.example-code.com/java/rest_oauth1_params.asp

 

david

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: