Login
Free Sign Up
Docs
/

Auth - OAuth Get Access Token

Type identifier: auth:oauth:getAccessToken Category: Auth Operations

Description

Gets an OAuth access token for a configured OAuth credential. The token is automatically refreshed when needed and returned as a wrapped secret value.

Input Handles

This node has no input handles.

Output Handles

Handle

Data Type

Description

accessToken

secretValue

OAuth access token wrapped as a secret value

Configuration Options

Property

Type

Required

Default

Description

label

string

Yes

"OAuth - Get Access Token"

Display label for the node

oauthCredentialId

string (CUID2)

Yes

""

OAuth credential to resolve and refresh

Behaviour

  1. Reads the OAuth credential selected in oauthCredentialId.
  2. Gets a valid access token for the credential, refreshing it if required.
  3. Emits the token on accessToken as a secret value.

Error Codes

Flow Error Code

Meaning

OAUTH_CREDENTIAL_NOT_FOUND

Credential does not exist or was removed

OAUTH_CREDENTIAL_NOT_AUTHORIZED

Credential is not authorised or is missing required data. Re-authorise the credential.

OAUTH_REFRESH_FAILED

Refresh token is invalid or expired, or the refresh failed. Re-authorise the credential.

OAUTH_GET_ACCESS_TOKEN_FAILED

Generic token retrieval failure

Example

{
  "type": "auth:oauth:getAccessToken",
  "data": {
    "label": "OAuth - Get Access Token",
    "oauthCredentialId": "cm123exampleoauthcredentialid"
  }
}

Related pages