Please be sure you’ve read the docs and API specs before asking for help. Also, please be sure you’ve searched the forum for your answer before you create a new topic.
Hi All,
I have configured WSC connector with HTTP operations like test connection, aggregation, entitlement, etc. The token got expired after sometime, how to refresh the token and use it in HTTP operation. The response is in xml format. Tried the below code but it working.
Used custom authentication and created custom auth http operation.
<?xml version='1.0' encoding='UTF-8'?>
Before operation rule to retrieve token.
@uday_kilambiCTS I have already try that by adding return requestEndPoint; in the end line of code. But it was throwing error token timed out when i attached this rule to Account aggregation operation.
Whether iam doing it correctly or not i don’t know iam bit confused. If i have gave the token hardcoded in the body of the request payload with rule attached i am not able to do the aggregation. If i remove the rule and try the aggregation with hardcoded token it was successfull.
Also in Account operation Header i have configured Authorization - apiToken and use this variable in the body for token value as $application.apiToken$ is this correct way of doing it?
Have you tried logging your apiKey that you set in the rule, did you verify if it is returning the right format of apiKey. If you capture the apiKey in the rule, try using it directly on postman or hardcoding it on the header and verify that it is the valid token for your API.
@Santhakumar you can also store the access token in the OOTB attribute called accesstoken and refer in other HTTP operations with $application.accesstoken$
Hi team,
I have resolved this issue by creating webservice AfterOperation Rule for Custom Authentication operation and map the custom schema attribute in the rule.
After that i have used the variable $application.apiToken_CA$ inside body for other operations.
Thanks @uday_kilambiCTS@Abhinov7@udayputta for your inputs