curl --request POST https://api.acealliance.capital/oauth/v1/token \
--header "Content-Type: application/x-www-form-urlencoded" \
--data "grant_type=client_credentials" \
--data "client_id=CLIENT_ID" \
--data "client_secret=CLIENT_SECRET"
curl --request POST https://api.acealliance.capital/oauth/v1/token \
--user "CLIENT_ID:CLIENT_SECRET" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data "grant_type=client_credentials"
{
"access_token": "ACCESS_TOKEN",
"token_type": "Bearer",
"expires_in": 3600
}
{
"error": "invalid_client",
"error_description": "Client authentication failed."
}
Start
Request an access token
POST
/
oauth
/
v1
/
token
curl --request POST https://api.acealliance.capital/oauth/v1/token \
--header "Content-Type: application/x-www-form-urlencoded" \
--data "grant_type=client_credentials" \
--data "client_id=CLIENT_ID" \
--data "client_secret=CLIENT_SECRET"
curl --request POST https://api.acealliance.capital/oauth/v1/token \
--user "CLIENT_ID:CLIENT_SECRET" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data "grant_type=client_credentials"
{
"access_token": "ACCESS_TOKEN",
"token_type": "Bearer",
"expires_in": 3600
}
{
"error": "invalid_client",
"error_description": "Client authentication failed."
}
OAuth 2.0 client credentials grant. The request is form encoded. The token lasts one hour.
Send the credentials in the form body or with HTTP Basic authentication, not both.
The response carries
curl --request POST https://api.acealliance.capital/oauth/v1/token \
--header "Content-Type: application/x-www-form-urlencoded" \
--data "grant_type=client_credentials" \
--data "client_id=CLIENT_ID" \
--data "client_secret=CLIENT_SECRET"
curl --request POST https://api.acealliance.capital/oauth/v1/token \
--user "CLIENT_ID:CLIENT_SECRET" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data "grant_type=client_credentials"
{
"access_token": "ACCESS_TOKEN",
"token_type": "Bearer",
"expires_in": 3600
}
{
"error": "invalid_client",
"error_description": "Client authentication failed."
}
Headers
string
required
application/x-www-form-urlencodedstring
Basic followed by the base64 of CLIENT_ID:CLIENT_SECRET. Replaces client_id and client_secret in the body.Request body
string
required
client_credentialsstring
Required without HTTP Basic authentication.
string
Required without HTTP Basic authentication.
Response
string
required
Send as
Authorization: Bearer ACCESS_TOKEN on the other endpoints.string
required
Bearerinteger
required
3600Cache-Control: no-store.
Errors
| Status | error | Meaning |
|---|---|---|
400 | unsupported_grant_type | grant_type is not client_credentials. |
400 | invalid_request | Both HTTP Basic and form credentials were sent. |
401 | invalid_client | The client ID or secret is not accepted. Same answer for every credential problem. |
413 | Body larger than 4096 bytes. No body. | |
429 | More than 30 requests in 60 seconds for this client ID. No body. |
Tokens
- No refresh token. Request a new token before the current one expires.
- Reuse one token for all calls during its hour.
- A revoked secret stops new tokens. Issued tokens run to expiry.