OAuth 2.0 access token flow
- Last Updated: July 2, 2025
- 1 minute read
- DataDirect Connectors
- JDBC
- Aha! 6.0
- Documentation
Note: To use OAuth2 authentication, you must first register your application with Aha!.
Refer to the Aha! documentation for more information.
Typically, an OAuth 2.0 grant type or access flow is handled by the application. However, in some scenarios, you may need to secure an access token using external processes. In those instances, you can use the access token flow to access the service manually.
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.
The following string includes the properties used to connect with the OAuth 2.0 access token flow.
jdbc:datadirect:aha:servername;AuthenticationMethod=OAuth2;
AccessToken=access_token;[property=value[;...]];
where:
- serviceurl
- specifies the base URL of the Aha! service to which you want to issue requests. For example, company.aha.io.
- access_token
- specifies the access token required to authenticate to Aha!. This property allows you to set the access token manually.
- property=value
- specifies connection property settings. Multiple properties are separated by a semi-colon.
The following example connection string includes the properties required for connecting with the OAuth 2.0 access token flow.
Connection conn = DriverManager.getConnection
("jdbc:datadirect:aha://company.aha.io;authenticationMethod=OAuth2;
accesstoken=abc12cd34efg5678h9ij87klm6543no32pqr10;");