Purpose: API calls to the Advisor Portal (Element) platform must be made using an unique token acquired in addition to an Orion Connect token.
Simple Use Case: Firm was to generate a token to call the Advisor Portal API to retrieve details from active proposals.
Scope and Outputs: Allows access the Advisor Portal platform and APIs.
Process Overview:
- Authenticate to Orion Connect and collect a token.
- Use Orion Connect token to acquire an Advisor Portal token.
Process Steps:
- Retrieve Orion token based on preferred authentication method. See article for Basic SAML or Oauth authentication methods.
- With the Orion token as the payload, call the endpoint for an Element token.
Example call for Element Token: (NOTE: The credentials must be passed as base 64 encoded values. )
fetch("https://api.orionelement.com/v1/token", {
"headers": {
"accept": "application/json, text/plain, /",
"accept-language": "en-US,en;q=0.9″,
"content-type": "application/x-www-form-urlencoded",
"deviceid": "ZmY0OThiZmMtZGVjOC0zZGE0LWRhNjUtNDUwYjQzN2RkMTFm",
"sec-ch-ua": "\" Not;A Brand\";v=\"99\", \"Google Chrome\";v=\"91\", \"Chromium\";v=\"91\"",
"sec-ch-ua-mobile": "?0",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-site",
"x-auth_type": "2FA"
},
"referrer": "https://dev.orionelement.com/",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": "grant_type=password&username={{base64EncodedUserName}}==&password={{base64EncodedPassword",
"method": "POST",
"mode": "cors",
"credentials": "omit"
});