Authentication API (1.0.0)
Quiqup uses OAuth2 authentication for secure API access.
For more details on OAuth2 please refer to the OAuth2 Documentation.
Overview
QuiQup Support
Languages
Servers
Mock server
https://developer-docs.quiqup.com/_mock/auth/
Production Server
https://platform-api.quiqup.com/
Staging Server
https://platform-api.staging.quiqup.com/
Request
All our API endpoints support the OAuth 2.0 authentication protocol.
To start sending authenticated HTTP requests, follow these steps:
1️⃣ Obtain an OAuth2 Access Token
- Use your provided
client_idandclient_secretto request an access token. - Note: Staging and Production have different token expiration rules.
2️⃣ Token Expiration
- Production: Tokens are valid for 7 days.
- Staging: Tokens expire every 1 hour.
3️⃣ Token Renewal
- Ensure your integration handles token renewal properly.
- You can either track the token expiry time or automatically request a new token when your token has expired.
🔹 Description Obtain an OAuth2 access token using the Client Credentials flow.
🔹 Token Expiry
- Production:
expires_in: 604800(7 days) - Staging:
expires_in: 3600(1 hour)
{
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"grant_type": "client_credentials"
}{
"access_token": "245c47495152da4845b65f57facdd7c8b6765451e946b9faa4817c245a335110",
"created_at": 1616571253,
"expires_in": 604800,
"token_type": "bearer"
}{
"access_token": "b76d4a126cf84959a8276f812321d598",
"created_at": 1616571253,
"expires_in": 3600,
"token_type": "bearer"
}🔹 HTTP 401 Unauthorized
- Cause: The provided
client_idorclient_secretis incorrect. - Fix: Verify credentials in your API settings.
🔹 HTTP 400 Bad Request
- Cause: The
grant_typemust be\"client_credentials\". - Fix: Ensure you pass
grant_type=client_credentialsin the request.
🔹 HTTP 401 Unauthorized
- Cause: The access token has expired.
- Fix: Request a new access token using
POST /oauth/token.
- application/json
- application/x-www-form-urlencoded
The refresh token to use to get a new access token. Only used when the grant_type is refresh_token.
- Mock serverhttps://developer-docs.quiqup.com/_mock/auth/oauth/token
- Production Serverhttps://platform-api.quiqup.com/oauth/token
- Staging Serverhttps://platform-api.staging.quiqup.com/oauth/token
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer-docs.quiqup.com/_mock/auth/oauth/token \
-H 'Content-Type: application/json' \
-d '{
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"grant_type": "client_credentials"
}'Response
application/json
{ "access_token": "245c47495152da4845b65f57facdd7c8b6765451e946b9faa4817c245a335110", "created_at": 1616571253, "expires_in": 3600, "token_type": "bearer" }