MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer Bearer {TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Usa tu token interno para consumir la API.

Endpoints

POST api/v1/login

requires authentication

Example request:
curl --request POST \
    "http://localhost:8000/api/v1/login" \
    --header "Authorization: Bearer Bearer {TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/login"
);

const headers = {
    "Authorization": "Bearer Bearer {TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/login

Headers

Authorization        

Example: Bearer Bearer {TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/auth/google

requires authentication

Example request:
curl --request POST \
    "http://localhost:8000/api/v1/auth/google" \
    --header "Authorization: Bearer Bearer {TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/auth/google"
);

const headers = {
    "Authorization": "Bearer Bearer {TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/auth/google

Headers

Authorization        

Example: Bearer Bearer {TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/user

requires authentication

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/user" \
    --header "Authorization: Bearer Bearer {TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/user"
);

const headers = {
    "Authorization": "Bearer Bearer {TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:5173
 

{
    "success": false,
    "message": "No autenticado"
}
 

Request      

GET api/v1/user

Headers

Authorization        

Example: Bearer Bearer {TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/logout

requires authentication

Example request:
curl --request POST \
    "http://localhost:8000/api/v1/logout" \
    --header "Authorization: Bearer Bearer {TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/logout"
);

const headers = {
    "Authorization": "Bearer Bearer {TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/logout

Headers

Authorization        

Example: Bearer Bearer {TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/me

requires authentication

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/me" \
    --header "Authorization: Bearer Bearer {TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/me"
);

const headers = {
    "Authorization": "Bearer Bearer {TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:5173
 

{
    "success": false,
    "message": "No autenticado"
}
 

Request      

GET api/v1/me

Headers

Authorization        

Example: Bearer Bearer {TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json