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
userId
path
string
true
none
token
path
string
true
verification token sent via email
Responses
Code sample
GET /users/me
This resource fetches the user profile information.
Responses
Example responses
200 Response
Code sample
PUT /users/me/password
This resource updates a user password.
Body parameter
Parameters
body
object
body
true
none
» oldPassword
string
body
true
none
» newPassword
string
body
true
none
Responses
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
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
clientCredentialsas grant type
Body parameter to create an access token using refreshToken as grant type
Responses
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
Example responses
200 Response
Code sample
GET /users/me/client-keys
This resource fetches Client Keys
Responses
Example responses
200 Response
Code sample
DELETE /users/me/client-keys/{id}
This resource removes a Client Key by ID
Parameters
id
path
string
true
Key ID
Responses
Code sample
GET /users/me/events
This resource fetches the user events
Responses
Example Responses
200 Response
Code sample
Last updated
Was this helpful?
