토큰 엔드포인트
curl --request POST \
--url https://api.headlesscommerce.io/v1/oauth/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--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>"
}OAuth 2.1
토큰 엔드포인트
인가 코드를 토큰으로 교환하거나, 기존 토큰을 갱신합니다.
인가 코드 교환 (grant_type=authorization_code):
code,client_id,redirect_uri,code_verifier(PKCE) 필요access_token(1시간 TTL)과refresh_token(30일 TTL) 반환
토큰 갱신 (grant_type=refresh_token):
refresh_token과client_id필요- 새로운 액세스 토큰과 교체된 리프레시 토큰 반환
POST
/
oauth
/
token
토큰 엔드포인트
curl --request POST \
--url https://api.headlesscommerce.io/v1/oauth/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--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
⌘I