Access Token

This endpoint creates a new Access Token


To create a new Access Token, please make a POST request to the following URL:

Key Parameters

grant_typeStringpasswordYesThe grant authorization type
usernameString-YesThe username of the user wheater an end user or the owner
passwordString-YesThe password of the user wheater an end user or the owner
audienceString-NoYour API identifier
scopeStringread:writeYesThe scope of the authentication, it could be for read or write purposes
client_idString-YesThe client ID of your account
client_secretString-YesThe client secret of your account


Client ID and Client Secret

You must request the client_id and client_secret to the technical Ubidots team. Please send this request to the following e-mail: [email protected]


Content-TypeString(application/x-www-form-urlencoded)Content type of keys
curl --location --request POST '' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'grant_type=password' \
--data 'username=check' \
--data 'password=75904268leo' \
--data 'scope=write' \
--data 'client_id=CNpL7wnnnBdTp8uUNKDK5KjT8cV28TA6wOu4Psst' \
--data 'client_secret=TC8B8vSeVNCOuMyGIZ4Pmxjf52c8dPyteJRVjxxai5SIpNmI0APluWHBr0XLzs6i6GGAN5cViY7DnzqypKcetaq8Msky9hOeHYu46C96hgIfldqpo5IVWQJ2M57KEHhe'
  "access_token": "UmXZ6WavsakMLtaIQ7P9p9y0M1HBSs",
  "expires_in": 36000,
  "token_type": "Bearer",
  "scope": "write",
  "refresh_token": "aFcDvEmm0zDjJd4vcSE9AtMlIcnpoP"
  "error": "invalid_grant",
  "error_description": "Invalid credentials given."

Returns an Object containing the oAuth2 session.


List of endpoints available with Auth2






Content-TypeString(application/json)Content type of body
Authorization: BearerStringAccess Token
curl --request GET \
--url '' \
-H 'Authorization: Bearer cBBLtgOhfYImGiH47QLG1OTKjtqDd0'\
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
      "url": "",
      "id": "639a820378b2b3000cd18c0e",
      "organization": {
        "url": "",
        "id": "62b4eb3519cd98007bf410bf",
        "label": "my-third-customer",
        "name": "Cliente1",
        "createdAt": "2022-06-23T22:37:41.840643Z"
      "label": "xbee",
      "name": "xbee",
      "description": "",
      "tags": [],
      "properties": {},
      "isActive": true,
      "lastActivity": 1671110138954,
      "createdAt": "2022-12-15T02:10:11.432971Z",
      "variables": "",
      "variablesCount": 1
  "code": 401002,
  "message": "Incorrect authentication credentials."

Returns an object with the requested endpoint.