Using Bearer Token authentication

Bearer token authentication is the method often used when an API requires a token string to identify the user or user session. This procedure uses Bearer Token authentication.
Prerequisites: You are working in Workbench and are connected to the station with an HttpClientNetwork. You have the token to authorize Bearer Token authentication.
This authentication method is included in the Authorization header as follows:

Authorization: Bearer xxx


Perform the following steps:
  1. Double-click HttpClient and expand Address.
    The Property Sheet opens.
    Image

    In this example, the address has been changed to a url protected by bearer token auth.

  2. Set Mode to Secure and Path to /bearer.
  3. Expand Config > Drivers > HttpClientNetwork, double-click the HttpClientDevice and expand Authenticator.
    The properties expand.
    Image
  4. Select BearerTokenAuth from the Auth Type drop-down list and click Save
    The driver updates the Config options.
  5. Expand Config, enter the Token and click Save.
  6. Right-click HttpClient and click Actions > Send.
    The driver sends the request and the Out slot reports success.
    Image