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());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.