The access token authentication flow passes the access token directly from the client to the GitHub 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 is obtained from sources external to the flow and specified using the Access Token option.

Note: Access tokens are temporary and must be replaced to maintain the session without interruption. The life of an access token is typically one hour.
Note: On Windows, as opposed to using a third-party application such as Postman, you can use the Progress DataDirect GitHub Configuration Manager to obtain an access token to support the access token flow. See "Obtaining access tokens using the Configuration Manger" for details. Alternatively, you can obtain an access token from GitHub (both enterprise and cloud versions). Refer to the GitHub documentation at https://docs.github.com for details.

To configure the driver to use an access token flow:

  • Set the Host Name (HostName) option to the host portion of the HTTP endpoint to which you want to send requests. For example, github.enterprise.com for enterprise accounts and api.github.com for cloud accounts.
  • Set the Authentication Method (AuthenticationMethod) option to 24 (OAuth2).
  • Set the Access Token (AccessToken) option to the value of the access token obtained from external sources.

The following examples show the connection information required to establish a session using the access token flow.

Connection string

DRIVER=DataDirect 8.0 GitHub;HostName=api.github.com;
AuthenticationMethod=24;AccessToken=C3TQH9zjwek4CgJCU-4Mxb2DxLNfI2LB3a-dNfpWYx;

odbc.ini file

[GitHub]
Driver=ODBCHOME/lib/ivgithub28.so
Description=DataDirect 8.0 GitHub
...
AuthenticationMethod=24
...
AccessToken=C3TQH9zjwek4CgJCU-4Mxb2DxLNfI2LB3a-dNfpWYx
...
HostName=api.github.com
...