- Redirecting users to Pleo for authorisation
- Receiving authorisation codes
- Exchanging codes for access and refresh tokens
- Refreshing tokens securely
- Calling Pleo APIs on behalf of authorised users
When You Need This
You should complete OAuth 2.0 client configuration after:- Registering your OAuth 2.0 client with Pleo
- Receiving your Client ID and Client Secret
- Selecting an OAuth 2.0 client library or framework
Configuration Checklist
Ensure your OAuth 2.0 client is configured with:- Client ID
- Authorisation endpoint
- Token endpoint
- Redirect URI (must match registered values exactly)
- Requested scopes
- PKCE enabled (S256)
Required OAuth 2.0 Configuration Parameters
Configure your OAuth 2.0 client using the following values:| Parameter | Value |
|---|---|
| Authorisation Endpoint | {AUTHORIZATION_SERVER_URL}/oauth/authorize |
| Token Endpoint | {AUTHORIZATION_SERVER_URL}/oauth/token |
| Grant Type | Authorisation Code (with PKCE) |
| PKCE | Required (S256 only) |
| Redirect URI | One of the registered redirect URIs |
| Scopes | Approved scopes from client registration |
Exact configuration keys depend on the OAuth 2.0 library you use. Refer to your library’s documentation for precise mappings.
PKCE Requirements
Pleo requires Proof Key for Code Exchange (PKCE) where supported by the client.- Only the S256 code challenge method is supported
- Plain (
plain) PKCE is not allowed - PKCE is mandatory for public clients (SPAs, mobile apps)
- PKCE is strongly recommended for confidential clients
- Generate a
code_verifier - Send the corresponding
code_challengeduring authorisation - Provide the
code_verifierduring token exchange
Authorisation Server URLs
Replace{AUTHORIZATION_SERVER_URL} with the base URL of the environment you are targeting:
| Environment | Authorisation Server URL |
|---|---|
| Staging | https://auth.staging.pleo.io |
| Production | https://auth.pleo.io |
Redirect URI Configuration
Your OAuth 2.0 client must use redirect URIs that:- Exactly match the URIs registered with Pleo
- Are publicly accessible (except
localhostfor development) - Use HTTPS in production environments
- Do not contain wildcards
state parameter to route users internally after authorisation.
Client Authentication Method
Pleo supports client authentication at the token endpoint only for confidential clients.- Supported method:
client_secret_basic
- Send the Client ID and Client Secret via HTTP Basic Authentication
- Store the Client Secret securely on the server
- Never expose the Client Secret in frontend or public code
- Must not use a client secret
- Must rely on PKCE for security
What This Configuration Enables
Once configured correctly, your OAuth 2.0 client can:- Redirect users to Pleo for authorisation
- Receive authorisation codes securely
- Exchange codes for access and refresh tokens
- Refresh access tokens without re-prompting users
- Access Pleo APIs on behalf of authorised users
FAQs
What is the difference between an integration, application, and OAuth 2.0 client?
What is the difference between an integration, application, and OAuth 2.0 client?
These terms describe different parts of how OAuth 2.0 works in the Pleo platform.The difference between an integration, application, and OAuth 2.0 client is explained in the OAuth 2.0 Concepts and Terminology section.