Log in
curl --request POST \
--url https://api.dev.impactu.colav.co/login \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'import requests
url = "https://api.dev.impactu.colav.co/login"
payload = {
"email": "<string>",
"password": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email: '<string>', password: '<string>'})
};
fetch('https://api.dev.impactu.colav.co/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dev.impactu.colav.co/login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>',
'password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dev.impactu.colav.co/login"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dev.impactu.colav.co/login")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.impactu.colav.co/login")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"_id": "example-institution-id",
"institution": "Universidad Ejemplo",
"role": "staff"
}
{"msg": "correo y contraseña requeridos", "success": false}
{ "success": false, "msg": "El cuerpo de la petición debe ser un objeto JSON." }
{"msg": "Usuario con correo usuario@example.com no encontrado o contraseña no conciden", "success": false}
{ "success": false, "msg": "El usuario está desactivado. Contacte al administrador del sistema" }
Authentication
Log in
Authenticates with email and password. If valid, sets an HttpOnly cookie with the session JWT.
POST
/
login
Log in
curl --request POST \
--url https://api.dev.impactu.colav.co/login \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'import requests
url = "https://api.dev.impactu.colav.co/login"
payload = {
"email": "<string>",
"password": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email: '<string>', password: '<string>'})
};
fetch('https://api.dev.impactu.colav.co/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dev.impactu.colav.co/login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>',
'password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dev.impactu.colav.co/login"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dev.impactu.colav.co/login")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.impactu.colav.co/login")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"_id": "example-institution-id",
"institution": "Universidad Ejemplo",
"role": "staff"
}
{"msg": "correo y contraseña requeridos", "success": false}
{ "success": false, "msg": "El cuerpo de la petición debe ser un objeto JSON." }
{"msg": "Usuario con correo usuario@example.com no encontrado o contraseña no conciden", "success": false}
{ "success": false, "msg": "El usuario está desactivado. Contacte al administrador del sistema" }
Request body
A JSON object with both fields as text. If either is missing, empty or not text, it returns400.
string
required
User’s email address.
string
required
User’s password.
The JWT is not returned in the response body. It is set
automatically as the HttpOnly cookie
access_token_cookie. Later calls
to protected endpoints must include this cookie. Logging in
also creates the csrf_access_token cookie: its value goes in the
X-CSRF-TOKEN header of session requests other than GET.Response
boolean
true if authentication succeeded.string
ROR identifier of the institution associated with the user.
string
Name of the institution.
string
User’s role on the platform (
admin, staff, etc.).{
"success": true,
"_id": "example-institution-id",
"institution": "Universidad Ejemplo",
"role": "staff"
}
{"msg": "correo y contraseña requeridos", "success": false}
{ "success": false, "msg": "El cuerpo de la petición debe ser un objeto JSON." }
{"msg": "Usuario con correo usuario@example.com no encontrado o contraseña no conciden", "success": false}
{ "success": false, "msg": "El usuario está desactivado. Contacte al administrador del sistema" }