02-01-2021 08:51 PM
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.
02-02-2021 06:26 AM
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
02-06-2021 04:33 PM
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.
02-07-2021 08:40 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide