OAuth 2.0 token endpoint (authorization code exchange and refresh token)
Token endpoint supporting multiple grant types according to RFC 6749: - Authorization Code (Section 4.1.3): Exchange authorization code for access tokens - Refresh Token (Section 6): Exchange refresh token for new access tokens Authorization Code Flow: Requires PKCE (Proof Key for Code Exchange) with S256 challenge method according to RFC 7636. The code_verifier parameter is required and must match the code_challenge from the authorization request. The scopes granted during authorization are retrieved and included in the generated access token. Refresh Token Flow: Exchange a partner refresh token for a new access token and refresh token pair. The original refresh token is consumed and cannot be reused. The new refresh token maintains the same expiry as the original (1 year from initial creation).
Request
- Base URLhttps://partnerapi-staging.depop.com
- Authnone required
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body application/x-www-form-urlencoded
Example request
{
"grant_type": "authorization_code",
"code": "placeholder_auth_code_12345",
"redirect_uri": "https://example.com/auth/callback",
"client_id": "a1b2c3d4e5f6g7h8i9j0",
"client_secret": "client_secret_abc123",
"code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",
"refresh_token": "prt_26f4f74b761c83ef0d383bcfc419e114fd554331"
}Response
Successfully exchanged authorization code or refresh token for access and refresh tokens
Example response
{
"access_token": "pat_4eea1fdb98106005fea67ed65138df69afa0e6aa",
"refresh_token": "prt_26f4f74b761c83ef0d383bcfc419e114fd554331",
"expires_in": 3600,
"token_type": "Bearer"
}Changes
No recorded changes to this operation across all 1 revision of this API.