REST OAuth2

Budibase supports OAuth2 in REST connections using Client Credentials.

This is intended for machine-to-machine API access.

Required OAuth2 fields

FieldPurpose
NameLabel used in auth selection
Authentication methodHow client credentials are sent
Grant typeMust be Client Credentials
Service URLProvider token endpoint
Client IDOAuth application client ID
Client SecretOAuth application secret
ScopeOptional/required provider scopes

Configure OAuth2 in a connection

  1. Open Settings > Connections > APIs
  2. Open/create a connection
  3. Go to Authentication
  4. Click Add authentication
  5. Choose OAuth2 type
  6. Enter required fields
  7. Save

Use OAuth2 in queries

  1. Click Open in API Editor
  2. Open/create query
  3. Select OAuth2 config in query auth settings
  4. Click Send
  5. Save query

Example (Spotify)

  • Service URL: https://accounts.spotify.com/api/token
  • Grant type: Client Credentials

Use your provider-issued client ID and client secret.

Troubleshooting matrix

ErrorTypical causeAction
invalid_clientBad client ID/secretRe-copy credentials from provider
unsupported_grant_typeWrong grant configuredSet Client Credentials
invalid_scopeScope format/value invalidMatch provider scope syntax
API call still unauthorizedWrong auth config selected in queryRe-select auth config and resend

Related guides


What’s Next