Get player consent
curl --request GET \
--url https://api.manalens.dev/v0/projects/{projectId}/players/{playerKey}/consent \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.manalens.dev/v0/projects/{projectId}/players/{playerKey}/consent"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.manalens.dev/v0/projects/{projectId}/players/{playerKey}/consent', 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.manalens.dev/v0/projects/{projectId}/players/{playerKey}/consent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.manalens.dev/v0/projects/{projectId}/players/{playerKey}/consent"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.manalens.dev/v0/projects/{projectId}/players/{playerKey}/consent")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.manalens.dev/v0/projects/{projectId}/players/{playerKey}/consent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"player_key": "user:player_42",
"status": "anonymous",
"source": "cookie-banner-v1",
"updated_at": "2026-12-03T10:00:00.000Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"refused": [
{
"index": 0,
"message_id": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"results": [
{
"index": 0,
"user_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"feature": "<string>",
"billing_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"refused": [
{
"index": 0,
"message_id": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"results": [
{
"index": 0,
"user_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"feature": "<string>",
"billing_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"refused": [
{
"index": 0,
"message_id": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"results": [
{
"index": 0,
"user_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"feature": "<string>",
"billing_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"refused": [
{
"index": 0,
"message_id": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"results": [
{
"index": 0,
"user_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"feature": "<string>",
"billing_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"refused": [
{
"index": 0,
"message_id": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"results": [
{
"index": 0,
"user_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"feature": "<string>",
"billing_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"refused": [
{
"index": 0,
"message_id": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"results": [
{
"index": 0,
"user_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"feature": "<string>",
"billing_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"refused": [
{
"index": 0,
"message_id": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"results": [
{
"index": 0,
"user_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"feature": "<string>",
"billing_url": "<string>"
}
}Players API
Get Player Consent
Read the tracking consent that you recorded for one player: none, anonymous or full. A player with no record is not_set. Manalens does not enforce it.
GET
/
v0
/
projects
/
{projectId}
/
players
/
{playerKey}
/
consent
Get player consent
curl --request GET \
--url https://api.manalens.dev/v0/projects/{projectId}/players/{playerKey}/consent \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.manalens.dev/v0/projects/{projectId}/players/{playerKey}/consent"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.manalens.dev/v0/projects/{projectId}/players/{playerKey}/consent', 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.manalens.dev/v0/projects/{projectId}/players/{playerKey}/consent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.manalens.dev/v0/projects/{projectId}/players/{playerKey}/consent"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.manalens.dev/v0/projects/{projectId}/players/{playerKey}/consent")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.manalens.dev/v0/projects/{projectId}/players/{playerKey}/consent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"player_key": "user:player_42",
"status": "anonymous",
"source": "cookie-banner-v1",
"updated_at": "2026-12-03T10:00:00.000Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"refused": [
{
"index": 0,
"message_id": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"results": [
{
"index": 0,
"user_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"feature": "<string>",
"billing_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"refused": [
{
"index": 0,
"message_id": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"results": [
{
"index": 0,
"user_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"feature": "<string>",
"billing_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"refused": [
{
"index": 0,
"message_id": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"results": [
{
"index": 0,
"user_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"feature": "<string>",
"billing_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"refused": [
{
"index": 0,
"message_id": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"results": [
{
"index": 0,
"user_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"feature": "<string>",
"billing_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"refused": [
{
"index": 0,
"message_id": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"results": [
{
"index": 0,
"user_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"feature": "<string>",
"billing_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"refused": [
{
"index": 0,
"message_id": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"results": [
{
"index": 0,
"user_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"feature": "<string>",
"billing_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
],
"refused": [
{
"index": 0,
"message_id": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"results": [
{
"index": 0,
"user_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
],
"feature": "<string>",
"billing_url": "<string>"
}
}Reads the tracking consent that you recorded for one player with Set Player Consent. Use it to check a player’s choice before your game or backend sends events.
Manalens stores the record. It does not enforce it: your SDK setup and your servers decide what they send. See GDPR and privacy requests.
The record belongs to the key that you use. A record under
See Errors for the error format.
Authentication
Use an API key (mana_api_...) with the consent:write scope. The same scope reads and writes. See Authentication.
- The key works on its own project only. Another project’s key gets
404. - The key’s creator must be an owner, admin or editor.
- It works on every plan. The workspace needs an active subscription or trial.
- Call it from a server. A request with a browser
Originheader gets403.
Path parameters
| Parameter | Rule |
|---|---|
projectId | The project ID |
playerKey | user:<user_id>, where user_id is the ID that you send with identify, or anon:<anonymous_id> for a player that never identified. URL-encode the whole key, for example user%3Aplayer_42. |
anon:<id> is not shared with the identified player of that install: read the key that you wrote.
Response
200:
{
"player_key": "user:player_42",
"status": "anonymous",
"source": "cookie-banner-v1",
"updated_at": "2026-12-03T10:00:00.000Z"
}
| Field | Notes |
|---|---|
status | none: the player declined tracking. anonymous: tracking without identity or personal data. full: all tracking. not_set: no record exists. Treat not_set like none. |
source | Where the player chose, as you sent it. null for not_set. |
updated_at | When the record was last written. null for not_set. |
Example
curl -sS \
-H "Authorization: Bearer $MANALENS_CONSENT_KEY" \
"https://api.manalens.dev/v0/projects/$PROJECT_ID/players/user%3Aplayer_42/consent"
Errors
| Status | Code | Meaning |
|---|---|---|
400 | INVALID_PLAYER_KEY | The player key is not user:<user_id> or anon:<anonymous_id> |
401 | UNAUTHORIZED | The key is missing, malformed, unknown or revoked |
402 | SUBSCRIPTION_REQUIRED | The workspace has no active subscription or trial |
403 | FORBIDDEN | The key has no consent:write scope, its creator is not an owner, admin or editor, or the request came from a browser |
403 | WORKSPACE_SUSPENDED | The workspace is suspended |
404 | NOT_FOUND | The key belongs to another project |
429 | RATE_LIMITED | The project sent more than 600 consent requests this minute. Wait for Retry-After seconds. |
Authorizations
Path Parameters
Response
The record, or not_set