Skip to Content
0
Nov 27, 2020 at 05:32 AM

How to get token using destination in CAPM based service?

213 Views

Hi All,

I want to instantiate a workflow instance from my CAPM based service for which I need to pass the authorization header token. I am able to pass it by passing the headers as below; however I want to replace this method by a dynamic one; for example a destination so that I do not to pass the authorization as below. Any suggestions; how can we do it?

Jhodel Cailan - any suggestions?

Regards,

Karan

  var options = {
  'method': 'GET',
  'url': 'https://scp/oauth/token?grant_type=client_credentials',
 'headers': {
               'Accept': 'application/json',
               'Content-Type': 'application/json',
               'Authorization': 'Basic ************************'
                        }
              };