POST v1​/ oauth​/token

Endpoint to get an OAuth token calling Blomming OAuth server.

Instant gratification

Do it yourself from console!

All these examples assumes that you have already a couple of valid Application ID / Secret values, previously exported into CLIENT_ID / CLIENT_SECRET env variables.

If you don’t, please read here how to obtain them.

Readonly OAuth token (to access only to the buy API endpoints)

Try to fetch an OAuth token valid for buy endpoints.
curl https://api.blomming.com/v1/oauth/token \
-F grant_type=client_credentials \
-F client_id=$CLIENT_ID \
-F client_secret=$CLIENT_SECRET \
https://api.blomming.com/oauth/token

Personal OAuth token (to access to all the API endpoints)

Try to fetch a personal OAuth token valid for all the endpoints (buy + sell).
curl https://api.blomming.com/v1/oauth/token \
-F grant_type=password \
-F client_id=$CLIENT_ID \
-F client_secret=$CLIENT_SECRET \
-F username=<blomming_username> \
-F password=<blomming_password> \
https://api.blomming.com/oauth/token

Request

Example Request

{
  "grant_type": "client_credentials",
  "client_id": "e0104dd7477592a2ddbf96b5b1efe7f8f9ad2bfeb68b9e720117005eec00877b",
  "client_secret": "dfc23677ea008643a8ec9ba69b48ad33a1639aa8ab1eecffff48e45b54d18e10",
  "username": "user",
  "password": "passw0rd",
  "scope": "my_scope"
}

Request Parameters

  • grant_type

    The grant_type parameter

    • Required: yes
    • Type: string
    • Example: "client_credentials"
  • client_id

    The client identifier (to ask for a client_id and client_secret, contact us)

    • Required: no
    • Type: string
    • Example: "e0104dd7477592a2ddbf96b5b1efe7f8f9ad2bfeb68b9e720117005eec00877b"
  • client_secret

    The client secret (to ask for a client_id and client_secret, contact us)

    • Required: no
    • Type: string
    • Example: "dfc23677ea008643a8ec9ba69b48ad33a1639aa8ab1eecffff48e45b54d18e10"
  • username

    Username for resource owner credentials

    • Required: no
    • Type: string
    • Example: "user"
  • password

    Pasword for resource owner credentials

    • Required: no
    • Type: string
    • Example: "passw0rd"
  • scope

    Token scope

    • Required: no
    • Type: string
    • Example: "my_scope"

Response

Example Response

{
  "access_token": "dfc23677ea008643a8ec9ba69b48ad33a1639aa8ab1eecffff48e45b54d18e10",
  "expires_in": 7200,
  "scope": "buy",
  "token_type": "bearer",
  "refresh_token": "dfc23677ea008643a8ec9ba69b48ad33a1639aa8ab1eecffff48e45b54d18e10"
}

Response Parameters

Response Codes

Successful Response Codes

Failure Response Codes