Token

以有效的 authorization code 換取授權範圍內的 Bearer token。

POST /api/partner-auth/token

從 Application 後端以 JSON body 呼叫此 endpoint。

欄位必填說明
client_id是Active 的 Partner Client ID,其 Organization 與 Merchant 也必須為 active。
client_secret是只保存在 Application 後端的 secret。
code是未過期、未使用過的 authorization code。
redirect_uri是與 authorization code 綁定的完全相同 URI。
code_verifier條件授權時有送 code_challenge 才需要;43–128 字元,S256 雜湊後須等於 code_challenge,否則 401。

成功回應包含 access_token、token_type: Bearer、expires_in: 3600,以及所授予的 scope 字串。