skip to main content
Using the Driver : Authentication : OAuth 2.0 Authentication : Client Credentials Grant
  

Try DataDirect Drivers Now
Client Credentials Grant
The authentication flow for the client credentials grant exchanges client credentials for the access token at the location specified by the Token URI option.
To configure the driver to use a client credentials grant:
*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/googleanalytics.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.
*Set the Client ID (ClientID) option to specify the client ID key for your application.
*Set the Client Secret (ClientSecret) option to specify client secret for your application.
Important: The client secret is a confidential value used to authenticate the application to the server. To prevent unauthorized access, this value must be securely maintained.
*Set the Token URI (TokenURI) option to specify the endpoint used to exchange authentication credentials for access tokens. For example, https://example.com/oauth2/authorize/.
*Optionally, set the Scope (Scope) option to specify a space-separated list of OAuth scopes to limit the permissions granted by the access token.
*Optionally, specify values for any additional options you want to configure. See "Connection Option Descriptions" for a complete list of options.
The following example demonstrates a basic Google Analytics session using a client credentials grant:
Using a connection URL:
DRIVER=DataDirect 8.0 Autonomous REST Connector;AuthenticationMethod=OAuth2;
ClientID=123456789876-a1bc2de3fgh4ij567klmn8opqr.apps.googleusercontent.com;
ClientSecret=FaZBFRsGXTaR;RestConfigFile=C:/path/to/googleanalytics.rest;
TokenURI=https://accounts.google.com/o/oauth2/token;
Using an odbc.ini file with a 32-bit driver:
Driver=ODBCHOME/lib/ivautorestxx.so;
Description=My Autonomous REST Data Source
AuthenticationMethod=OAuth2
ClientID=123456789876-a1bc2de3fgh4ij567klmn8opqr9.apps.googleusercontent.com
ClientSecret=FaZBFRsGXTaR
RestConfigFile=C:/path/to/googleanalytics.rest
TokenURI=https://accounts.google.com/o/oauth2/token