Authorization code grant
- Last Updated: July 30, 2025
- 2 minute read
- DataDirect Connectors
- ODBC
- Aha! 8.0
- Documentation
The authorization code grant is a commonly used authentication flow for web and native applications. It provides secure connections by requiring multiple points of authentication before permitting access to data. When using the authorization code flow, the application is first redirected to the location hosting the temporary authorization code and retrieves it. Next, after being redirected to the location specified by the Redirect URI (RedirectURI) option, the application exchanges the authorization code, client ID, and client secret for the access token.
To configure the driver to use the refresh token grant:
- The application should be configured to set the Authorization Code (OAuthCode) option to specify the authorization code that is exchanged for the access token.
- Set the Host Name (HostName) option to the base URL of the base URL of the Aha! service to which you want to issue requests. For example, company.aha.io.
- Set the Authentication Method (AuthenticationMethod) option to
24(OAuth2). - Set the Client ID (ClientID) option to specify the client ID key for your application.
- Set the Client Secret (ClientSecret) option to specify the 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 Redirect URI (RedirectURI) to specify the endpoint to which the client is returned after third-party authorization. This value is the same as the one specified in the OAuth application.
- Optionally, specify values for any additional properties you want to configure.
The following examples demonstrate using an authorization code grant:
Connection string
DRIVER=DataDirect 8.0 Aha;HostName=company.aha.io;AuthenticationMethod=24;
ClientID=cd34efg5678h9ij87klm6543no32pqr10st987;ClientSecret=098zyx765wvu432tsr123qpo456;
OauthCode=abc12cd34efg5678h9ij87klm6543no32pqr10;RedirectURI=https://lvh.me/app_callback.html
odbc.ini file
[Aha]
Driver=ODBCHOME/lib/ivaha28.so
...
Description=DataDirect 8.0 Aha!
...
AuthenticationMethod=24
...
ClientID=cd34efg5678h9ij87klm6543no32pqr10st987
...
ClientSecret=098zyx765wvu432tsr123qpo456;
...
OauthCode=abc12cd34efg5678h9ij87klm6543no32pqr10
...
RedirectURI=https://lvh.me/app_callback.html
...
HostName=company.aha.io
...