Accounts API
This Accounts API reference guide describes the endpoints to access Bloq Accounts services.
Jump to:
PUT /users/{userId}/token/{token}
This resource verifies a new created user by User Id and verification token.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
userId | path | string | true | none |
token | path | string | true | verification token sent via email |
Responses
Status | Meaning | Description |
---|---|---|
200 | Successful operation |
Code sample
GET /users/me
This resource fetches the user profile information.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Successful operation | Inline |
Example responses
200 Response
Code sample
PUT /users/me/password
This resource updates a user password.
Body parameter
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
body | object | body | true | none |
» oldPassword | string | body | true | none |
» newPassword | string | body | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Successful operation | Inline |
Code sample
POST /auth
Using HTTP Basic Authentication to provide username (ID or email) and password, this resource retrieves an Account Access Token
to be passed to other Accounts API functions, for their authentication. The token expires after 12 hours and a new token may be generated at any time.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Successful operation | Inline |
Example responses
200 Response
Code sample
POST /auth/token
This endpoint provides a Client Access Token
and a Client Refresh Token
, these tokens are used to interact with cloud services like Nodes.
The Client Access Token expires after one hour and the Client Refresh Token expires after one year. The refresh access token is used to create new client access tokens.
Body parameter to create an Access and Refresh token using
clientCredentials
as grant type
Body parameter to create an access token using refreshToken as grant type
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Successful operation | Inline |
Example Responses
200 Response
Code sample
POST /users/me/client-keys
This resource creates a new client key pair. The key pair is used to generate a Client Access Token
, these access token are used to interact with cloud services like Nodes API. To access this endpoint an Account Access Token
must be provided as Bearer token in the authorization header.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Successful operation | Inline |
Example responses
200 Response
Code sample
GET /users/me/client-keys
This resource fetches Client Keys
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Successful operation | Inline |
Example responses
200 Response
Code sample
DELETE /users/me/client-keys/{id}
This resource removes a Client Key by ID
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Key ID |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | Successful operation | Inline |
Code sample
GET /users/me/events
This resource fetches the user events
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Successful operation | Inline |
Example Responses
200 Response
Code sample
Last updated