skip to main content
Using the Driver : Authentication : OAuth 2.0 Authentication : Access Token Flow
  

Try DataDirect Drivers Now
Access Token Flow
The access token authentication flow employs a simple authentication flow that passes the access token directly from the client to the REST service for authentication. Unlike other grant types, authentication credentials, such as authorization codes, are not exchanged in return for the access code. Instead, the access token has been obtained from sources external to the flow and specified using the Access Token option.
To configure the driver to use an access token authentication flow:
*The application should be configured to set the Access Token (AccessToken) option to specify the access token required to authenticate to a REST service.
*Configure the minimum options required for a connection:
*If you are using an input REST file, set the REST Config File (RestConfigFile) option to provide the name and location of the input REST file. For example, C:/path/to/yelp.rest.
*If you are using the REST Sample Path method, 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 OAuth2.
The following example demonstrates a basic Yelp session using an access token flow:
Using a connection URL:
DRIVER=DataDirect 8.0 Autonomous REST Connector;
AccessToken=C3TQH9zjwek4CgJCU-4Mxb2DxLNfI2LB3a-dNfpWYx;
AuthenticationMethod=OAuth2;RestConfigFile=C:/path/to/yelp.rest;
Using an odbc.ini file with a 32-bit driver:
Driver=ODBCHOME/lib/ivautorestxx.so;
Description=My Autonomous REST Data Source
AuthenticationMethod=OAuth2
RestConfigFile=C:/path/to/yelp.rest
Note: The AccessToken option is not usually defined in data source definitions due to the short lifespan of access tokens.