Auth
Get the Current User
Return the authenticated dashboard user and tenant for the current session.
GET
/
auth
/
me
Current user + tenant
curl --request GET \
--url https://billing.example.com/auth/me \
--cookie recurso_session=import requests
url = "https://billing.example.com/auth/me"
headers = {"cookie": "recurso_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'recurso_session='}};
fetch('https://billing.example.com/auth/me', 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://billing.example.com/auth/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "recurso_session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/auth/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "recurso_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://billing.example.com/auth/me")
.header("cookie", "recurso_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/auth/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'recurso_session='
response = http.request(request)
puts response.read_body{
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"name": "<string>",
"role": "owner"
},
"tenant": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
}{
"error": {
"code": "validation_failed",
"message": "<string>"
}
}Returns the authenticated dashboard user and their tenant, resolved from the
recurso_session cookie. Useful for restoring UI state after a page load;
returns 401 when the session is missing or expired.
Example Request
curl https://api.recurso.dev/auth/me \
-b cookies.txt
Example Response
{
"user": {
"id": "7b3f9c12-5e8a-4d16-b429-1c6f8a2d0e57",
"email": "admin@acme.com",
"name": "Ada Admin",
"role": "owner"
},
"tenant": {
"id": "d4c3b2a1-0f9e-4765-8321-abcdef012345",
"name": "Acme Corporation"
}
}
Authorizations
Dashboard user session cookie (httpOnly) issued by POST /auth/register and POST /auth/login. v1 endpoints accept EITHER this cookie or the tenant API key (bearerAuth).
⌘I
Current user + tenant
curl --request GET \
--url https://billing.example.com/auth/me \
--cookie recurso_session=import requests
url = "https://billing.example.com/auth/me"
headers = {"cookie": "recurso_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'recurso_session='}};
fetch('https://billing.example.com/auth/me', 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://billing.example.com/auth/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "recurso_session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/auth/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "recurso_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://billing.example.com/auth/me")
.header("cookie", "recurso_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/auth/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'recurso_session='
response = http.request(request)
puts response.read_body{
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"name": "<string>",
"role": "owner"
},
"tenant": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
}{
"error": {
"code": "validation_failed",
"message": "<string>"
}
}