Creating authorization URLs
The authorization URL is the first step in the OAuth 2.0 flow. It directs merchants to Yoco’s authorization server, where they can authenticate and grant your application permission to access their data.
Authorization server endpoints
Use these endpoints based on your environment:
The examples below reference the Sandbox URL. Update as needed for your environment.
URL structure and parameters
Your authorization URL should follow this format:
The parameters in the URL must be URL-encoded.
Required parameters
client_id: Your application’s unique identifier from the Developer Console.response_type: Must becodefor the authorization code flow.scope: Space-separated URL-encoded list of permissions.redirect_uri: Must exactly match the URL configured in your application.state: Random value for Cross-Site Request Forgery (CSRF) protection.
Scopes
See the complete OAuth scopes documentation for all available options.
State parameter
State parameter management, including generation, storage, and verification, is your application’s responsibility as part of CSRF protection.
Optional parameters
prompt: String (optional)- Supported value:
login - Description: Forces the login screen to be shown even if the user has an active session. Useful when users need to connect multiple Yoco accounts to your application.
- Supported value: