---
title: "액세스 토큰 발급"
method: POST
path: "/oauth2/token"
---

# 액세스 토큰 발급

`POST /oauth2/token`

## Request

- Base URL: `https://stage.openapi.sauce.im`
- URL: `https://stage.openapi.sauce.im/oauth2/token`
- Auth: HTTP basic

API 를 호출할 때 필요한 액세스 토큰을 발급받습니다.

## Headers

- `x-api-version` string, required
- `X-Request-Id` string

## Request body `application/x-www-form-urlencoded`

- object
  - `grant_type` 'client_credentials', required: `client_credentials` 고정
  - `client_id` string: 클라이언트 ID. Basic 인증 대신 본문으로 보낼 때만 사용합니다
  - `client_secret` string: 클라이언트 secret. Basic 인증 대신 본문으로 보낼 때만 사용합니다

## Response `200`

성공

- object
  - `access_token` string, required: API 호출에 쓰는 액세스 토큰. `Authorization: Bearer {access_token}` 으로 보냅니다
  - `token_type` string, required: 토큰 유형. `Bearer`
  - `expires_in` integer, required: 남은 유효 시간(초). 약 3600

## Other responses

- `400`: Bad Request — x-api-version 헤더 누락·불일치(G010), grant_type 누락(invalid_request), client_credentials 이외의 grant_type(unsupported_grant_type). clientId·clientSecret 이 틀리면 이보다 먼저 401 invalid_client
- `401`: Unauthorized — clientId·clientSecret 이 틀렸거나 폐기됨

---

[API](https://skmtc.dev/sauce/apis/saucelive-open-api.md) - [All operations](https://skmtc.dev/sauce/apis/saucelive-open-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sauce/apis/saucelive-open-api/revisions/ce228e9cc5c6?raw)
