Skip to content

Authentication

MiTrabajoWS uses token-based authentication. All requests except /auth/login must include the X-Api-Key header with a valid access token.


Login

POST https://api.mitrabajo.uy/auth/login

Authenticate with your credentials to receive an access token.

Request Headers

Header Value Required
Content-Type application/json Yes

Request Body

Field Type Required Description
username string Yes Your MiTrabajo username
password string Yes Your MiTrabajo password

Example

curl -X POST https://api.mitrabajo.uy/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "username": "admin",
    "password": "secret123"
  }'

Response

{
  "access_token": "EPZoeOHHDPz-ucc5HweJYt6xehe_1bV-"
}

Using the Token

Include the returned token in the X-Api-Key header of every subsequent request:

curl https://api.mitrabajo.uy/workplaces \
  -H "X-Api-Key: EPZoeOHHDPz-ucc5HweJYt6xehe_1bV-"

If the token is missing or invalid the API responds with 401 Unauthorized.