메인 콘텐츠로 건너뛰기
POST
/
oauth
/
token
토큰 엔드포인트
curl --request POST \
  --url https://api.headlesscommerce.io/v1/oauth/token \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data grant_type=authorization_code \
  --data 'client_id=<string>' \
  --data 'code=<string>' \
  --data 'redirect_uri=<string>' \
  --data 'code_verifier=<string>' \
  --data 'refresh_token=<string>'
{
  "access_token": "<string>",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "<string>",
  "scope": "<string>"
}

본문

application/x-www-form-urlencoded
grant_type
enum<string>
필수
사용 가능한 옵션:
authorization_code,
refresh_token
client_id
string
필수
code
string

인가 코드 (authorization_code 교환 시)

redirect_uri
string<uri>

/oauth/authorize에서 사용한 것과 동일한 URI

code_verifier
string

PKCE 코드 검증자 (authorization_code 교환 시)

refresh_token
string

리프레시 토큰 (refresh_token 교환 시)

응답

토큰 응답

access_token
string
token_type
string
예시:

"Bearer"

expires_in
integer
예시:

3600

refresh_token
string
scope
string