VeBox OAuth2 API

Overview

The authentication of a client to access the VeBox API uses OAuth 2.0.
It uses the Password grant for logging in with the user's username and password.

Index

Token retrieval

To login with the user credentials and obtain a token, a request is made using POST to the following resource: /oauth/token.
Content-Type: application/x-www-form-urlencoded.

Request body

The request header must have a Basic Authentication with the client id and secret as username and password.
The request body supports the following fields:

Response body

A successful request will return the token for the user.

Token refresh

To refresh a token, a request is made using POST to the following resource: /oauth/token.
Content-Type: application/x-www-form-urlencoded.

Request body

The request header must have a Basic Authentication with the client id and secret as username and password.
The request body supports the following fields:

Response body

A successful request will return a new token with the same structure of the token obtained the first time.

Check token

It is possible to check if an access token is valid with a GET or POST request to the following resource: /oauth/check_token.

Request body

The request body supports the following fields:

Response body

A successful request will return the information about the scope, resource ids, authorities, ecc...

User info

To retrieve the user information, a request is made using GET to the following resource: /user.

Request body

The request body supports the following fields:

Response body

A successful request will return the information about the user.