API Reference

Authorization

UnDosTres APIs use the OAuth 2.0 standard, allowing you to authenticate securely using a single Bearer token.
Using the Token

Once you obtain your access token, it must be included in the Authorization header for every request made to our APIs.

Example using cURL:

Request

curl -X POST https\://sandcaas.undostres.com.mx/api/oauth/login \  
 -H "Content-Type: application/json" \
 -d '{
   "email": "[email protected]",
   "password": "anypasswordyouhave"
 }'

Response

{
  "message": "Login success",
  "data": {
    "accessToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI4MDgxMjE4IiwiaWF0IjoxNzUxNDg0MjQ5LCJleHAiOjE3NTE0ODQ4NDksImp0aSI6IjFjOTI4NWI4LTE5NjAtNDBkMi05ZDk3LTFmNDU0YzcxNDU1YiIsInR5cGUiOiJBUyIsImF1dGhvcml6YXRpb25MZXZlbCI6IlByaXZhdGUifQ.5DEVfgla5KPFfcaZbXdvplAo6IkyMiI8uyBpJ7Rz6ww",
    "refreshToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI4MDgxMjE4IiwiaWF0IjoxNzUxNDg0MjQ5LCJleHAiOjE3NTkyNjAyNDksImp0aSI6ImRhMjM3Y2Q4LWYyODEtNDRmMi1iMDJmLTZjYWM2YmZiOGJhYiIsInR5cGUiOiJSUyIsImF1dGhvcml6YXRpb25MZXZlbCI6IlByaXZhdGUifQ.u1qXUJMJOItEBt4GjMXRcOjgiCZnRXagbofJU0wrdtw"
  },
  "error": null
}