Skip to content

Authentication

ODP-SDK supports authentication from within a few different environments. The following guides will help you get started with authentication in your environment of choice:

The SDK will pick the authentication method based on the environment:

  1. Interactive Auth (default)
  2. Hardcoded Token

While using Workspaces you will not need to authenticate with the SDK. The SDK will automatically use the token in the workspace to authenticate the user.

Interactive Auth

The SDK by default will use the interactive authentication method. When the user performs an operation with the SDK that requires authentication for the first time, a browser window will open and the user will be prompted to log in. The SDK will then use the token from the browser to authenticate the user.

Hardcoded Token

If the ODP_ACCESS_TOKEN environment variable is set, the SDK will use the hardcoded token authentication method. The token looks like this: Bearer <your token>

Tokens can be generated using Postman, or via the API. The hard coded token will support static machine to machine authentication. But is also used for testing purposes.

Here are a few helpful links to learn more about environment variables and how to set them: