Skip to main content

OAuth 2.0

Manages OAuth 2.0 authentication flows, including token acquisition, storage, and automatic refresh.

Grant types

Select the grant type that matches the API you are connecting to:

Grant TypeDescription
Authorization CodeUser-facing OAuth flow. Redirects the user to the provider's login page to grant access
Client CredentialsServer-to-server flow. No user interaction required
Refresh TokenUses a refresh token to obtain new access tokens
Password (Resource Owner)Exchanges a username and password directly for a token. Avoid if possible — use Authorization Code instead

Fields

Fields vary by grant type. Common fields:

FieldDescription
Auth URLThe authorisation endpoint (Authorization Code only)
Access Token URLThe token endpoint
Refresh Token URLThe refresh endpoint (if different from the token URL)
Client IDYour application's client identifier
Client SecretYour application's client secret
Redirect URIThe callback URL registered with the provider. For Blokkio, use the OAuth2 callback URL shown in the connection form
ScopeSpace-separated list of requested scopes
Client AuthenticationHow to send client credentials: Header (Basic Auth) or Body

For Password grant:

FieldDescription
UsernameResource owner username
PasswordResource owner password

Token handling

Blokkio stores the access token, refresh token, and expiry from the provider's token response. When a token is near expiry, Blokkio automatically requests a new one using the refresh token before executing the next workflow run.

Authorization Code flow

For the Authorization Code grant, after saving the connection you will be prompted to complete the OAuth flow:

  1. Click Authorise. You are redirected to the provider's login page.
  2. Log in and grant the requested permissions.
  3. You are redirected back to Blokkio. The access token is stored automatically.

The redirect URI registered with your OAuth provider must match the Blokkio OAuth2 callback URL shown in the connection form.