Learn how to authorize with the SynchPay API using client credentials.
To access the SynchPay API, you need to obtain an access token by authorizing with your ClientId and ClientSecret, which are provided by SynchPay support.Note: Keep your ClientId and ClientSecret secure and do not expose them in client-side code or public repositories.
To make authorized requests to the API, include the access token in the Authorization header of your HTTP requests:Authorization: Bearer \<AccessToken>Replace <AccessToken> with the actual access token received from the token endpoint.Example:
Copy
Ask AI
GET /some/protected/endpoint HTTP/1.1Host: api.synchpay.comAuthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
The access token is valid for one hour (3600 seconds). After it expires, you need to obtain a new token by calling the token endpoint again with your credentials.