curl --request POST \
--url https://api.googa.com.br/v1/entitlements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscriber_id": "<string>",
"plan": "reader-plus"
}
'import requests
url = "https://api.googa.com.br/v1/entitlements"
payload = {
"subscriber_id": "<string>",
"plan": "reader-plus"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({subscriber_id: '<string>', plan: 'reader-plus'})
};
fetch('https://api.googa.com.br/v1/entitlements', 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.googa.com.br/v1/entitlements",
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([
'subscriber_id' => '<string>',
'plan' => 'reader-plus'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.googa.com.br/v1/entitlements"
payload := strings.NewReader("{\n \"subscriber_id\": \"<string>\",\n \"plan\": \"reader-plus\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.googa.com.br/v1/entitlements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscriber_id\": \"<string>\",\n \"plan\": \"reader-plus\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.googa.com.br/v1/entitlements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscriber_id\": \"<string>\",\n \"plan\": \"reader-plus\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}{
"error": "invalid_request",
"error_description": "Missing subscriber_id, product, or status"
}{
"error": "invalid_request",
"error_description": "Missing subscriber_id, product, or status"
}{
"error": "invalid_request",
"error_description": "Missing subscriber_id, product, or status"
}Ativa, suspende ou cancela o acesso de um assinante a um produto
Upsert por (parceiro, assinante, produto): chamar novamente com o mesmo assinante/produto e um status diferente atualiza o entitlement existente — não cria duplicado. Por ser um upsert, repetir a mesma chamada é seguro; não há (nem é necessário) um header Idempotency-Key — esse mecanismo chegou a ser proposto, mas não está implementado.
Enquanto o SSO não existe, o entitlement fica registrado em uma tabela própria de parceiro no projeto do produto (partner_subscribers) — ele não cria nem altera a assinatura de nenhuma conta do app oficial. Ver Modelo de dados.
curl --request POST \
--url https://api.googa.com.br/v1/entitlements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscriber_id": "<string>",
"plan": "reader-plus"
}
'import requests
url = "https://api.googa.com.br/v1/entitlements"
payload = {
"subscriber_id": "<string>",
"plan": "reader-plus"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({subscriber_id: '<string>', plan: 'reader-plus'})
};
fetch('https://api.googa.com.br/v1/entitlements', 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.googa.com.br/v1/entitlements",
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([
'subscriber_id' => '<string>',
'plan' => 'reader-plus'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.googa.com.br/v1/entitlements"
payload := strings.NewReader("{\n \"subscriber_id\": \"<string>\",\n \"plan\": \"reader-plus\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.googa.com.br/v1/entitlements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscriber_id\": \"<string>\",\n \"plan\": \"reader-plus\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.googa.com.br/v1/entitlements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscriber_id\": \"<string>\",\n \"plan\": \"reader-plus\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}{
"error": "invalid_request",
"error_description": "Missing subscriber_id, product, or status"
}{
"error": "invalid_request",
"error_description": "Missing subscriber_id, product, or status"
}{
"error": "invalid_request",
"error_description": "Missing subscriber_id, product, or status"
}Authorizations
Client credentials — para Entitlements (escrita), Subscriber Status e Billing (leitura). Cada endpoint exige o escopo correspondente; um token sem o escopo recebe 403.
Body
Identificador do assinante no sistema do parceiro.
novelai, novelaudio, historinhai active, suspended, canceled Plano contratado pelo assinante no parceiro (mapeado para um plano interno Googa). Opcional.
"reader-plus"
Response
Entitlement aplicado.
true