Authentication
Token
OAuth2 token endpoint. Exchanges authorization code for access tokens.
**Request Body (JSON or Form):**
- `grant_type`: OAuth2 grant type - "authorization_code" or "refresh_token" (required)
- `code`: Authorization code from OAuth2 callback (required for authorization_code grant)
- `redirect_uri`: Redirect URI used in authorization (required for authorization_code grant)
- `client_type`: Client type - "papr_plugin" or "browser_extension" (optional, default: papr_plugin)
- `refresh_token`: Refresh token for token refresh (required for refresh_token grant)
**Response:**
- `access_token`: OAuth2 access token for API authentication
- `token_type`: Token type (Bearer)
- `expires_in`: Token expiration time in seconds
- `refresh_token`: Refresh token for getting new access tokens
- `scope`: OAuth2 scopes granted
- `user_id`: User ID from Auth0
**Example Request:**
```json
{
"grant_type": "authorization_code",
"code": "abc123...",
"redirect_uri": "https://chat.openai.com",
"client_type": "papr_plugin"
}
```
post/token
Response
OAuth2 token exchange successful