---
title: Authentication
slug: payment/authentication
description: Learn how to use JWT tokens with the KlaviPay API for secure authentication. This document dives into obtaining tokens with access and secret keys and passing them via the Authorization Header. Discover the importance of HTTPS for all requests and the nee
docTags: 
createdAt: 2023-05-18T20:03:32.000Z
---

## Introduction[​](https://docs.klavipay.ai/docs/dev-guides/integration-api/authentication#introduction)

Klavi API uses JWT tokens to authenticate requests.

With a `accessKey` and a `secretKey` you can get an token and pass it to the Authorization Header via bearer token.

Request it at `/v1/auth` passing int the body the JSON:

```json
{
    "accessKey": "L0l1a2v3i4",
    "secretKey": "TtMdrH&a8MfjdyUnFs*#dypaX15%qpXtXQt2n$"
}
```

Usage example:

:::BlockQuote
Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...uKHsXAvSDaK0RdV9xq3-OSrLA
:::

All requests must be done via HTTPS. Authenticated requests must be submitted with the appropriate authorization header.

## Grant authorization[​](https://docs.klavipay.ai/docs/dev-guides/integration-api/authentication#grant-authorization)

Klavi provides two types of APIs: Customer API and Management API. Although both use JWT token authentication method, because of the different use scenarios of the two APIs, different `accessKey` and `secretKey` are required.
