Authentication
Please contact developers@beadpay.io to acquire your authentication credentials.
Overview
This guide provides an overview of how integrators can authenticate to and acquire an access token from our OpenID Connect (OIDC) endpoint using the Resource Owner Password Credentials (ROPC) flow. The ROPC flow allows direct exchange of the user's credentials for an access token and, optionally, an ID token. This flow is suitable for trusted applications, such as those running on secure servers, and is best suited for scenarios where other flows (like Authorization Code) are not feasible.
You can read more about OAuth2 and OIDC here.
Prerequisites
User credentials: Obtain these from Bead Pay. Alternatively, these can be the username and password you use to log into the portal.
OpenID Connect token endpoint:
For users familiar with the OIDC protocol, OIDC metadata can be found at:
Login
For the most part, integrators will be authenticating on behalf of a Terminal. In this case, the username will be {terminalId}@beadpay.io
and the password will be the terminal's password.
POST
https://identity.beadpay.io/realms/{nonprod|prod}/protocol/openid-connect/token
Request Headers
Body
Example curl command:
Response
To access protected endpoints, pass the access token in the Authorization header of the request.
Example API call using curl:
Refresh Token
When the access token expires, the client can use the refresh token to obtain a new access token without requiring the user’s credentials.
Endpoint: https://identity.beadpay.io/realms/{nonprod|prod}/protocol/openid-connect/token
Request Headers:
Request Body:
Sample curl
Command:
Response Example - Refresh Token Flow
Upon success, the server responds with a new access token, and optionally, a new refresh token.
Example Response:
Last updated