Prerequisites
Before you begin:- Your OAuth 2.0 client is registered with Pleo.
- You have a Client ID.
- You have at least one registered redirect URI.
- You do not yet have access tokens.
Steps
1. Decide When to Redirect Users
Redirect users when:- They select a Connect to Pleo action in your application.
- Their previous authorisation has expired or been revoked.
- A refresh token can no longer be used.
2. Prepare PKCE Values
Pleo requires PKCE (Proof Key for Code Exchange) by default. Before redirecting the user:- Generate a cryptographically random code verifier.
- Derive a code challenge using SHA-256.
- Store the code verifier securely on your server or in the user session.
3. Build the Authorisation Request
Redirect the user’s browser to Pleo’s OAuth 2.0 authorisation endpoint using an HTTP redirect. The request must include the following parameters (refer to Client Configuration for server URLs and authentication method details):
Optional Pleo-specific parameter
Example Redirect
4. Handle the User Consent Flow
After the redirect:- Pleo authenticates the user (if required).
- Pleo displays a consent screen showing:
- Your application name and logo
- The requested scopes
- The user approves or denies access.
5. Receive the Redirect Response
If the user approves access:- Pleo redirects the browser back to your
redirect_uri. - An authorisation code is included in the query parameters.
- The original
statevalue is returned unchanged.
- The redirect contains an error.
- No authorisation code is issued.
Example Redirect Response
Result
After completing these steps:- The user has authenticated with Pleo.
- The user has granted or denied consent.
- Your registered OAuth 2.0 client has received an authorisation code if the user granted consent.
- No access tokens exist yet.
- API calls are not possible at this stage.
What Comes Next?
this how-to is part of:
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.
Related Reading
- OAuth 2.0 Client Registration – Step-by-step details of required fields, credentials, and redirect URIs.
- OAuth 2.0 Client Configuration – How to configure your client with correct endpoints, PKCE, and authentication methods.
- PKCE and Secured Patterns – Security requirements for public clients.