Bearer token authentication
- Last Updated: April 20, 2022
- 1 minute read
- DataDirect Connectors
- ODBC
- Autonomous Rest Connector 8.0
- Documentation
To configure the driver to use bearer token authentication:
- Configure the minimum options required for a connection:
- If you are using a Model file, set the REST Config File (RestConfigFile) option to provide the name and location of the Model file. For example, C:/path/to/myrest.rest.
- If you are using the REST Sample Path option, set the REST Sample
Path (RestSamplePath) option to specify the
endpoint that the want to connect to and sample. For example,
https://example.com/countries/.
- Set the Authentication Method (AuthenticationMethod) option to
34(Bearer token). - Set the SecurityToken (SecurityToken) option to specify your the API Token, configured as BearerToken, used for authentication.
- Optionally, specify values for any additional options you want to configure. See "Connection option descriptions" for a complete list of options.
The following examples demonstrate a session using a Model file with bearer token authentication and using a Model file:
Using a connection URL:
DRIVER=DataDirect 8.0 Autonomous REST Connector;AuthenticationMethod=34;
RestConfigFile=C:/path/to/myrest.rest;
SecurityToken=C3TQH9zjwek4CgJCU-4Mxb2DxLNfI2LB3a-dNfpWYx
Using an odbc.ini file with the 32-bit driver:
Driver=ODBCHOME/lib/ivautorestxx.so
Description=My Autonomous REST Data Source
...
AuthenticationMethod=34
...
RestConfigFile=C:/path/to/myrest.rest
...