---
title: "Generate Access Token (B2B) API"
method: POST
path: "/access-token/b2b"
---

# Generate Access Token (B2B) API

`POST /access-token/b2b`

## Request

- Base URL: `https://api.durianpay.id/v1.0`
- URL: `https://api.durianpay.id/v1.0/access-token/b2b`
- Auth: API key in header `Content-Type` and API key in header `X-TIMESTAMP` and API key in header `X-SIGNATURE` and API key in header `X-CLIENT-KEY`

The following endpoint generate access token for SNAP transaction APIs

## Headers

- `Content-Type` string, required
- `X-TIMESTAMP` string, required
- `X-SIGNATURE` string, required
- `X-CLIENT-KEY` string, required

## Request body

- object
  - `grantType` string, required: Value: AUTHORIZATION_CODE

## Response `200`

200

- object
  - `responseCode` string
  - `responseMessage` string
  - `accessToken` string
  - `tokenType` string
  - `expiresIn` string

## Other responses

- `401`: 401
- `500`: 500
- `504`: 504

---

[API](https://skmtc.dev/durianpay/apis/durianpay-snap-api-access-token.md) - [All operations](https://skmtc.dev/durianpay/apis/durianpay-snap-api-access-token/llms.txt) - [OpenAPI document](https://skmtc.dev/durianpay/apis/durianpay-snap-api-access-token/revisions/fdea96923e97?raw)
