Authentication

You'll need to authenticate your requests to access any of the endpoints in the KlyrePay API. Here, we'll look at how authentication works. KlyrePay authenticate your API requests by OAuth2 with a token — OAuth2 is the recommended way.

OAuth2 with bearer token

The recommended way to authenticate with the KlyrePay API is by using OAuth2. When establishing a connection using OAuth2, you will need your access token — you will get it by generating it after you get successfuly login. Here's how to add the token to the request header using cURL:

Example request with bearer token

curl https://YOURENDPOINT.virtualrx.co/jsonapi.php \
  -H "Authorization: Bearer {token}"

Always keep your token safe and reset it if you suspect it has been compromised.