OAuth 2.0 refresh token grant
- Last Updated: July 2, 2025
- 1 minute read
- DataDirect Connectors
- JDBC
- Documentation
You may configure the driver to access Google Analytics resources using OAuth 2.0. In the connection URL, you may provide a refresh token to connect using the refresh token grant. With a valid refresh token, the driver can obtain a new access token. In this way, a refresh token enables application access to Google for multiple sessions over an extended period of time.
The following connection URL uses the refresh token grant.
jdbc:datadirect:googleanalytics:RefreshToken=refresh_token;[property=value[;...]];
where:
- refresh_token
- specifies the refresh token used to either request a new access token or renew an expired access token.
- property=value
- specifies connection property settings. Multiple properties are separated by a semi-colon.
The AccessToken and RefreshToken properties may both be specified. If a value for the AccessToken property is not specified, the driver uses the value of the RefreshToken property to make a connection. If both values are not specified, the driver cannot make a successful connection. If both are specified, the driver ignores the AccessToken value and uses the RefreshToken value to generate a new AccessToken value.
For information on setting up OAuth 2.0 authentication, including obtaining access and refresh tokens, see OAuth 2.0 authentication.