const { CredentialsMethod, OpenFgaClient, ConsistencyPreference } = require('@openfga/sdk');
const fgaClient = new OpenFgaClient({
apiUrl: process.env.FGA_API_URL, // https://api.us1.fga.dev, or your store's eu1/au1 region
storeId: process.env.FGA_STORE_ID,
authorizationModelId: process.env.FGA_MODEL_ID,
credentials: {
method: CredentialsMethod.ClientCredentials,
config: {
apiTokenIssuer: process.env.FGA_API_TOKEN_ISSUER, // auth.fga.dev
apiAudience: process.env.FGA_API_AUDIENCE, // URL for your store's region
clientId: process.env.FGA_CLIENT_ID,
clientSecret: process.env.FGA_CLIENT_SECRET,
},
},
});
async function main() {
const response = await fgaClient.readAuthorizationModel();
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});
package main
import (
"context"
"os"
. "github.com/openfga/go-sdk/client"
"github.com/openfga/go-sdk/credentials"
)
// Configure FGA_API_URL and FGA_API_AUDIENCE for your store's us1/eu1/au1 region.
// Set FGA_STORE_ID, FGA_MODEL_ID, FGA_API_TOKEN_ISSUER, FGA_CLIENT_ID, and FGA_CLIENT_SECRET.
func main() {
fgaClient, err := NewSdkClient(&ClientConfiguration{
ApiUrl: os.Getenv("FGA_API_URL"),
StoreId: os.Getenv("FGA_STORE_ID"),
AuthorizationModelId: os.Getenv("FGA_MODEL_ID"),
Credentials: &credentials.Credentials{
Method: credentials.CredentialsMethodClientCredentials,
Config: &credentials.Config{
ClientCredentialsApiTokenIssuer: os.Getenv("FGA_API_TOKEN_ISSUER"),
ClientCredentialsApiAudience: os.Getenv("FGA_API_AUDIENCE"),
ClientCredentialsClientId: os.Getenv("FGA_CLIENT_ID"),
ClientCredentialsClientSecret: os.Getenv("FGA_CLIENT_SECRET"),
},
},
})
if err != nil { panic(err) }
response, err := fgaClient.ReadAuthorizationModel(context.Background()).Execute()
if err != nil {
panic(err)
}
_ = response
}
using System.Collections.Generic;
using OpenFga.Sdk.Client;
using OpenFga.Sdk.Client.Model;
using OpenFga.Sdk.Configuration;
using OpenFga.Sdk.Model;
using Environment = System.Environment;
// FGA_API_URL and FGA_API_AUDIENCE must match the store's us1/eu1/au1 region.
var fgaClient = new OpenFgaClient(new ClientConfiguration() {
ApiUrl = Environment.GetEnvironmentVariable("FGA_API_URL"),
StoreId = Environment.GetEnvironmentVariable("FGA_STORE_ID"),
AuthorizationModelId = Environment.GetEnvironmentVariable("FGA_MODEL_ID"),
Credentials = new Credentials() {
Method = CredentialsMethod.ClientCredentials,
Config = new CredentialsConfig() {
ApiTokenIssuer = Environment.GetEnvironmentVariable("FGA_API_TOKEN_ISSUER"),
ApiAudience = Environment.GetEnvironmentVariable("FGA_API_AUDIENCE"),
ClientId = Environment.GetEnvironmentVariable("FGA_CLIENT_ID"),
ClientSecret = Environment.GetEnvironmentVariable("FGA_CLIENT_SECRET"),
}
}
});
var response = await fgaClient.ReadAuthorizationModel();
import asyncio
import os
from openfga_sdk.client import OpenFgaClient, ClientConfiguration
from openfga_sdk.client.models import ClientCheckRequest, ClientTuple
from openfga_sdk.models import RelationshipCondition
from openfga_sdk.credentials import Credentials, CredentialConfiguration
# FGA_API_URL and FGA_API_AUDIENCE must match the store's us1/eu1/au1 region.
credentials = Credentials(
method='client_credentials',
configuration=CredentialConfiguration(
api_issuer=os.environ.get('FGA_API_TOKEN_ISSUER'),
api_audience=os.environ.get('FGA_API_AUDIENCE'),
client_id=os.environ.get('FGA_CLIENT_ID'),
client_secret=os.environ.get('FGA_CLIENT_SECRET'),
),
)
async def main():
configuration = ClientConfiguration(
api_url=os.environ.get('FGA_API_URL'),
store_id=os.environ.get('FGA_STORE_ID'),
authorization_model_id=os.environ.get('FGA_MODEL_ID'),
credentials=credentials,
)
async with OpenFgaClient(configuration) as fga_client:
response = await fga_client.read_authorization_model()
asyncio.run(main())
import dev.openfga.sdk.api.client.OpenFgaClient;
import dev.openfga.sdk.api.configuration.ClientConfiguration;
import dev.openfga.sdk.api.configuration.ClientCredentials;
import dev.openfga.sdk.api.configuration.Credentials;
import dev.openfga.sdk.api.configuration.ClientCheckOptions;
import dev.openfga.sdk.api.configuration.ClientBatchCheckOptions;
import dev.openfga.sdk.api.configuration.ClientWriteOptions;
import dev.openfga.sdk.api.configuration.ClientListObjectsOptions;
import dev.openfga.sdk.api.configuration.ClientListUsersOptions;
import dev.openfga.sdk.api.client.model.*;
import dev.openfga.sdk.api.model.*;
import java.util.List;
import java.util.Map;
// FGA_API_URL and FGA_API_AUDIENCE must match the store's us1/eu1/au1 region.
public class Example {
public static void main(String[] args) throws Exception {
var config = new ClientConfiguration()
.apiUrl(System.getenv("FGA_API_URL"))
.storeId(System.getenv("FGA_STORE_ID"))
.authorizationModelId(System.getenv("FGA_MODEL_ID"))
.credentials(new Credentials(new ClientCredentials()
.apiTokenIssuer(System.getenv("FGA_API_TOKEN_ISSUER"))
.apiAudience(System.getenv("FGA_API_AUDIENCE"))
.clientId(System.getenv("FGA_CLIENT_ID"))
.clientSecret(System.getenv("FGA_CLIENT_SECRET"))));
var fgaClient = new OpenFgaClient(config);
var response = fgaClient.readAuthorizationModel().get();
}
}
# Set FGA_API_URL to your store region (https://api.us1.fga.dev, or eu1/au1).
# Set FGA_STORE_ID and obtain FGA_BEARER_TOKEN with the client credentials grant.
# See /integration/getting-your-api-keys; never put client secrets in source code.
# Set FGA_MODEL_ID to the authorization model ID.
curl -X GET "$FGA_API_URL/stores/$FGA_STORE_ID/authorization-models/$FGA_MODEL_ID" \
-H "authorization: Bearer $FGA_BEARER_TOKEN"
{
"code": "internal_error",
"message": "Internal Server Error"
}
Authorization Models
Get an authorization model by its ID
The ReadAuthorizationModel API returns an authorization model by its identifier.
The response returns the authorization model for the particular ID.
Authorization models in Auth0 FGA are immutable. You can create new versions, but you cannot delete or modify existing ones.
Example
To retrieve the authorization model with ID 01G5JAVJ41T49E9TT3SKVS7X1J for the store, call the GET authorization-models by ID API with 01G5JAVJ41T49E9TT3SKVS7X1J as the id path parameter. The API returns:
In the above example, there are 2 types (user and document). The document type has 2 relations (writer and reader).
GET
/
stores
/
{store_id}
/
authorization-models
/
{id}
Node.js
const { CredentialsMethod, OpenFgaClient, ConsistencyPreference } = require('@openfga/sdk');
const fgaClient = new OpenFgaClient({
apiUrl: process.env.FGA_API_URL, // https://api.us1.fga.dev, or your store's eu1/au1 region
storeId: process.env.FGA_STORE_ID,
authorizationModelId: process.env.FGA_MODEL_ID,
credentials: {
method: CredentialsMethod.ClientCredentials,
config: {
apiTokenIssuer: process.env.FGA_API_TOKEN_ISSUER, // auth.fga.dev
apiAudience: process.env.FGA_API_AUDIENCE, // URL for your store's region
clientId: process.env.FGA_CLIENT_ID,
clientSecret: process.env.FGA_CLIENT_SECRET,
},
},
});
async function main() {
const response = await fgaClient.readAuthorizationModel();
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});
package main
import (
"context"
"os"
. "github.com/openfga/go-sdk/client"
"github.com/openfga/go-sdk/credentials"
)
// Configure FGA_API_URL and FGA_API_AUDIENCE for your store's us1/eu1/au1 region.
// Set FGA_STORE_ID, FGA_MODEL_ID, FGA_API_TOKEN_ISSUER, FGA_CLIENT_ID, and FGA_CLIENT_SECRET.
func main() {
fgaClient, err := NewSdkClient(&ClientConfiguration{
ApiUrl: os.Getenv("FGA_API_URL"),
StoreId: os.Getenv("FGA_STORE_ID"),
AuthorizationModelId: os.Getenv("FGA_MODEL_ID"),
Credentials: &credentials.Credentials{
Method: credentials.CredentialsMethodClientCredentials,
Config: &credentials.Config{
ClientCredentialsApiTokenIssuer: os.Getenv("FGA_API_TOKEN_ISSUER"),
ClientCredentialsApiAudience: os.Getenv("FGA_API_AUDIENCE"),
ClientCredentialsClientId: os.Getenv("FGA_CLIENT_ID"),
ClientCredentialsClientSecret: os.Getenv("FGA_CLIENT_SECRET"),
},
},
})
if err != nil { panic(err) }
response, err := fgaClient.ReadAuthorizationModel(context.Background()).Execute()
if err != nil {
panic(err)
}
_ = response
}
using System.Collections.Generic;
using OpenFga.Sdk.Client;
using OpenFga.Sdk.Client.Model;
using OpenFga.Sdk.Configuration;
using OpenFga.Sdk.Model;
using Environment = System.Environment;
// FGA_API_URL and FGA_API_AUDIENCE must match the store's us1/eu1/au1 region.
var fgaClient = new OpenFgaClient(new ClientConfiguration() {
ApiUrl = Environment.GetEnvironmentVariable("FGA_API_URL"),
StoreId = Environment.GetEnvironmentVariable("FGA_STORE_ID"),
AuthorizationModelId = Environment.GetEnvironmentVariable("FGA_MODEL_ID"),
Credentials = new Credentials() {
Method = CredentialsMethod.ClientCredentials,
Config = new CredentialsConfig() {
ApiTokenIssuer = Environment.GetEnvironmentVariable("FGA_API_TOKEN_ISSUER"),
ApiAudience = Environment.GetEnvironmentVariable("FGA_API_AUDIENCE"),
ClientId = Environment.GetEnvironmentVariable("FGA_CLIENT_ID"),
ClientSecret = Environment.GetEnvironmentVariable("FGA_CLIENT_SECRET"),
}
}
});
var response = await fgaClient.ReadAuthorizationModel();
import asyncio
import os
from openfga_sdk.client import OpenFgaClient, ClientConfiguration
from openfga_sdk.client.models import ClientCheckRequest, ClientTuple
from openfga_sdk.models import RelationshipCondition
from openfga_sdk.credentials import Credentials, CredentialConfiguration
# FGA_API_URL and FGA_API_AUDIENCE must match the store's us1/eu1/au1 region.
credentials = Credentials(
method='client_credentials',
configuration=CredentialConfiguration(
api_issuer=os.environ.get('FGA_API_TOKEN_ISSUER'),
api_audience=os.environ.get('FGA_API_AUDIENCE'),
client_id=os.environ.get('FGA_CLIENT_ID'),
client_secret=os.environ.get('FGA_CLIENT_SECRET'),
),
)
async def main():
configuration = ClientConfiguration(
api_url=os.environ.get('FGA_API_URL'),
store_id=os.environ.get('FGA_STORE_ID'),
authorization_model_id=os.environ.get('FGA_MODEL_ID'),
credentials=credentials,
)
async with OpenFgaClient(configuration) as fga_client:
response = await fga_client.read_authorization_model()
asyncio.run(main())
import dev.openfga.sdk.api.client.OpenFgaClient;
import dev.openfga.sdk.api.configuration.ClientConfiguration;
import dev.openfga.sdk.api.configuration.ClientCredentials;
import dev.openfga.sdk.api.configuration.Credentials;
import dev.openfga.sdk.api.configuration.ClientCheckOptions;
import dev.openfga.sdk.api.configuration.ClientBatchCheckOptions;
import dev.openfga.sdk.api.configuration.ClientWriteOptions;
import dev.openfga.sdk.api.configuration.ClientListObjectsOptions;
import dev.openfga.sdk.api.configuration.ClientListUsersOptions;
import dev.openfga.sdk.api.client.model.*;
import dev.openfga.sdk.api.model.*;
import java.util.List;
import java.util.Map;
// FGA_API_URL and FGA_API_AUDIENCE must match the store's us1/eu1/au1 region.
public class Example {
public static void main(String[] args) throws Exception {
var config = new ClientConfiguration()
.apiUrl(System.getenv("FGA_API_URL"))
.storeId(System.getenv("FGA_STORE_ID"))
.authorizationModelId(System.getenv("FGA_MODEL_ID"))
.credentials(new Credentials(new ClientCredentials()
.apiTokenIssuer(System.getenv("FGA_API_TOKEN_ISSUER"))
.apiAudience(System.getenv("FGA_API_AUDIENCE"))
.clientId(System.getenv("FGA_CLIENT_ID"))
.clientSecret(System.getenv("FGA_CLIENT_SECRET"))));
var fgaClient = new OpenFgaClient(config);
var response = fgaClient.readAuthorizationModel().get();
}
}
# Set FGA_API_URL to your store region (https://api.us1.fga.dev, or eu1/au1).
# Set FGA_STORE_ID and obtain FGA_BEARER_TOKEN with the client credentials grant.
# See /integration/getting-your-api-keys; never put client secrets in source code.
# Set FGA_MODEL_ID to the authorization model ID.
curl -X GET "$FGA_API_URL/stores/$FGA_STORE_ID/authorization-models/$FGA_MODEL_ID" \
-H "authorization: Bearer $FGA_BEARER_TOKEN"
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Auth0 FGA Docs","description":"Guides and API reference for Auth0 Fine-Grained Authorization","colors":{"primary":"#9921FE","light":"#BC6DFF","dark":"#343434"},"logo":{"light":"https://mintlify.s3.us-west-1.amazonaws.com/auth0-fga/images/brand/auth0-fga-lockup-en-onlight.svg","dark":"https://mintlify.s3.us-west-1.amazonaws.com/auth0-fga/images/brand/auth0-fga-lockup-en-ondark.svg","href":"/"},"favicon":"https://mintlify.s3.us-west-1.amazonaws.com/auth0-fga/images/favicons/auth0-favicon-onlight.png","api":{"playground":{"display":"simple","proxy":false},"examples":{"autogenerate":false},"url":"full"},"appearance":{"default":"system","strict":false},"background":{"decoration":"gradient"},"navbar":{"links":[{"href":"https://dashboard.fga.dev/","label":"Log in"}],"primary":{"type":"button","label":"Sign up","href":"https://dashboard.fga.dev/"}},"footer":{"socials":{"x":"https://x.com/auth0","github":"https://github.com/auth0","linkedin":"https://www.linkedin.com/company/auth0"},"links":[{"header":"Resources","items":[{"label":"Auth0 FGA Playground","href":"https://play.fga.dev/"},{"label":"Zanzibar Academy","href":"https://zanzibar.academy/"},{"label":"Zanzibar paper","href":"https://research.google/pubs/pub48190"}]},{"header":"Community","items":[{"label":"Auth0 Community","href":"https://community.auth0.com/c/fga/111"},{"label":"GitHub","href":"https://github.com/auth0"},{"label":"Support","href":"/support"}]},{"header":"Explore","items":[{"label":"Auth0 FGA","href":"https://fga.dev/"},{"label":"API reference","href":"/api/service"},{"label":"Auth0 blog","href":"https://auth0.com/blog"}]},{"header":"ยฉ2026 Oktaยฎ Inc. All Rights Reserved.","items":[{"label":"Legal","href":"https://auth0.com/legal"},{"label":"Privacy","href":"https://auth0.com/privacy"},{"label":"Terms","href":"https://www.okta.com/terms-of-service"}]}]},"seo":{"metatags":{"og:image":"https://docs.fga.dev/img/og-auth0-fga.png"}},"fonts":{"heading":{"family":"Space Grotesk"},"body":{"family":"Inter"}},"integrations":{"heap":{"appId":"1279799279"},"onetrust":{"domainScript":"c7cbb039-db9f-4d9b-b04a-1274791c2e95","categoryId":"2","scriptSource":"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js"}},"contextual":{"options":["copy","view","chatgpt","claude","add-mcp"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"auth0-fga","hasAudioNarration":false,"actualSubdomain":"auth0-fga","customDomains":["docs.fga.dev"],"gitSource":{"type":"github","owner":"atko-cic","repo":"fga-docs","deployBranch":"main","contentDirectory":"docs-site","isPrivate":true,"mountPath":"","label":"","_id":"6ada19c416a91434b90355b6"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae9fe5a4867c64450fcea06","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"Docs","count":104},{"language":"default","tag":"Define your authorization model","count":25},{"language":"default","tag":"Add Authorization To Your API","count":20},{"language":"default","tag":"API Reference","count":17},{"language":"default","tag":"FGA Dashboard","count":13},{"language":"default","tag":"Introduction to Auth0 FGA","count":11},{"language":"default","tag":"Auth0 Relationship Sync","count":11},{"language":"default","tag":"Write Your Authorization Data","count":8},{"language":"default","tag":"Best Practices","count":7},{"language":"default","tag":"Advanced Modeling","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"global.css","content":"#assistant-entry,#assistant-entry-mobile{display:none!important}div:has(>#search-bar-entry){justify-content:center}.chat-assistant-floating-input>div{max-width:36rem;margin-inline:auto}@media (min-width: 1280px){#navbar>.max-w-8xl,#body-content{max-width:104rem}#content-container{max-width:86rem}#footer>div{max-width:80rem}#body-content:has(#sidebar-content a[href=\"/fga\"]) #content-container:has(#table-of-contents-layout) #content-area{max-width:54rem;min-width:0}#body-content:has(#sidebar-content a[href=\"/fga\"]) #content-container:has(#table-of-contents-layout){padding-top:1rem;padding-right:0;padding-left:1rem;column-gap:1rem}#body-content:has(#sidebar-content a[href=\"/fga\"]) #content-container:has(#table-of-contents-layout) #content-side-layout{width:16rem;max-width:16rem;flex:0 0 16rem}#body-content:has(#sidebar-content a[href=\"/fga\"]) #content-container:has(#table-of-contents-layout) #table-of-contents-layout{width:16rem;padding-left:1rem}#body-content:has(#sidebar-content a[href=\"/fga\"]) #content-container:has(#table-of-contents-layout) #table-of-contents{width:15rem}#body-content:has(#sidebar-content a[href=\"/fga\"]) #content-container:has(#table-of-contents-layout) #content{margin-top:1rem}}@media (min-width: 1600px){#body-content:has(#sidebar-content a[href=\"/fga\"]) #content-container:has(#table-of-contents-layout) #content-side-layout{width:17rem;max-width:17rem;flex:0 1 17rem;min-width:16rem}#body-content:has(#sidebar-content a[href=\"/fga\"]) #content-container:has(#table-of-contents-layout) #table-of-contents-layout,#body-content:has(#sidebar-content a[href=\"/fga\"]) #content-container:has(#table-of-contents-layout) #table-of-contents{width:100%}}body:has(.fga-home-page) #header,body:has(.fga-home-page) #pagination,body:has(.fga-home-page) #content-side-layout,body:has(.fga-home-page) #table-of-contents-layout{display:none}body:has(.fga-home-page) #content-area{width:100%;max-width:none;min-width:0}body:has(.fga-home-page) #content{margin-top:0;margin-bottom:0}.fga-home-page{width:min(100%, 84rem);margin:0 auto;padding-bottom:3rem;color:#1f2430}.fga-home-page h1,.fga-home-page h2,.fga-home-page h3,.fga-home-page p{margin:0}.fga-home-intro{position:relative;isolation:isolate;min-height:23rem;overflow:hidden;padding:clamp(2.5rem, 6vw, 5.25rem);border-radius:0 0 2.5rem 2.5rem;background:#f6f7fa}.fga-home-intro::after{position:absolute;z-index:-1;top:-6rem;right:-9rem;width:min(64%, 37rem);height:34rem;border-radius:50%;background:repeating-radial-gradient(\n ellipse at 100% 50%,\n transparent 0,\n transparent 1rem,\n rgba(160, 170, 177, 0.18) calc(1rem + 1px),\n transparent calc(1rem + 2px)\n );content:'';transform:rotate(-8deg);pointer-events:none}.fga-home-intro-copy{display:grid;gap:clamp(1.5rem, 3vw, 2.25rem);min-height:12rem}.fga-home-intro h1{max-width:48rem;color:#1f2430;font-size:clamp(2.5rem, 5vw, 4.5rem);font-weight:500;line-height:0.98;letter-spacing:-0.055em;text-wrap:balance}.fga-home-intro-description{position:relative;z-index:1;max-width:42rem}.fga-home-intro-description p{color:#3f4651;font-size:clamp(1rem, 1.45vw, 1.25rem);font-weight:500;line-height:1.6}.fga-home-text-link{display:inline-flex;gap:0.45rem;align-items:center;margin-top:1.5rem;border-bottom:0!important;color:oklch(0.21 0.034 264.665)!important;font-weight:750;text-decoration:none!important}.fga-home-relationship{display:flex;align-items:center;flex-direction:column;margin:4.5rem 0 6rem;text-align:center}.fga-home-relationship p{max-width:41rem;margin-bottom:2.75rem;color:#5e6570;font-size:1rem;line-height:1.65}.fga-home-relationship img{display:block;width:min(100%, 58rem);height:auto;margin:0;border-radius:1.5rem;object-fit:contain}.fga-home-section-heading{display:grid;grid-template-columns:minmax(0, 1fr) minmax(18rem, 0.72fr);gap:2rem;align-items:end;margin-bottom:2rem}.fga-home-section-heading h2,.fga-home-features>h2{max-width:39rem;color:#1f2430;font-size:clamp(2rem, 4vw, 3.4rem);font-weight:500;line-height:1.03;letter-spacing:-0.045em;text-wrap:balance}.fga-home-section-heading p{color:#5e6570;line-height:1.65}.fga-home-step-list{display:grid;gap:1rem}.fga-home-step{display:grid;grid-template-columns:5.5rem minmax(14rem, 0.8fr) minmax(16rem, 1fr);gap:clamp(1.5rem, 4vw, 3.5rem);align-items:start;min-height:18rem;padding:clamp(1.75rem, 4vw, 3rem);border:1px solid #e1e4e9;border-radius:2rem;background:#fff}.fga-home-step--featured{border-color:transparent;background:#eceff5}.fga-home-step-number{display:flex;align-items:center;justify-content:center;width:5rem;height:5rem;border-radius:1.5rem;color:#fff;font-size:1.5rem;font-weight:760;letter-spacing:-0.04em}.fga-home-step-number--one{background:linear-gradient(145deg, #6042d9 4%, #ff45cc 96%)}.fga-home-step-number--two{background:linear-gradient(152deg, #ff44dd 2%, #ebca40 97%)}.fga-home-step-number--three{background:linear-gradient(332deg, #ebca40 6%, #1bc99f 97%)}.fga-home-step-summary h3,.fga-home-feature-card h3{color:#1f2430;font-size:clamp(1.45rem, 2.2vw, 2rem);font-weight:550;line-height:1.15;letter-spacing:-0.035em;text-wrap:balance}.fga-home-step-summary p{margin-top:0.85rem;color:#5e6570;line-height:1.6}.fga-home-button{display:inline-flex;gap:0.5rem;align-items:center;justify-content:center;min-height:2.75rem;margin-top:1.5rem;padding:0.7rem 1rem;border:1px solid rgb(var(--gray-300));border-radius:0.65rem;color:oklch(0.21 0.034 264.665)!important;font-size:0.9rem;font-weight:750;text-decoration:none!important;transition:border-color 160ms ease,\n background-color 160ms ease,\n box-shadow 160ms ease}.fga-home-button:hover{border-color:rgb(var(--primary));background:rgb(var(--gray-50));box-shadow:0 0 0 3px rgb(var(--primary) / 0.12)}.fga-home-button:focus-visible{outline:2px solid rgb(var(--primary));outline-offset:3px}.fga-home-button--primary{border-color:rgb(var(--primary));background:rgb(var(--primary));color:#fff!important}.fga-home-button--primary:hover{border-color:rgb(var(--primary));background:rgb(var(--primary));box-shadow:0 0 0 3px rgb(var(--primary) / 0.16);color:#fff!important}.fga-home-step-resources{display:grid;gap:0.85rem;padding-left:clamp(1.5rem, 4vw, 3.5rem);border-left:1px solid rgba(89, 96, 108, 0.2)}.fga-home-resource-link{display:flex;gap:0.35rem;align-items:baseline;border-bottom:0!important;color:oklch(0.21 0.034 264.665)!important;font-weight:650;line-height:1.45;text-decoration:none!important}.fga-home-resource-link>span[data-as=\"p\"]{display:flex;gap:0.35rem;min-width:0}.fga-home-resource-link>span[data-as=\"p\"]>span:first-child{display:inline-block;min-width:0.75rem;color:#6c7079;font-variant-numeric:tabular-nums}.fga-home-link-text{text-decoration:underline;text-decoration-color:#9921fe;text-decoration-thickness:1px;text-underline-offset:0.25rem;transition:text-decoration-thickness 160ms ease}.fga-home-text-link:hover .fga-home-link-text,.fga-home-resource-link:hover .fga-home-link-text{text-decoration-thickness:2px}.fga-home-resource-link--numbered>span[data-as=\"p\"]>span:first-child{min-width:2rem}.fga-home-features{margin-top:6rem}.fga-home-feature-grid{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:1rem;margin-top:2rem}.fga-home-feature-card{position:relative;isolation:isolate;display:flex;justify-content:space-between;flex-direction:column;min-height:21rem;overflow:hidden;padding:clamp(1.75rem, 4vw, 3rem);border:1px solid #e1e4e9;border-radius:2rem;background:radial-gradient(circle at 100% 0, rgba(96, 66, 217, 0.13), transparent 42%),\n #fff}.fga-home-feature-card--api{background:radial-gradient(circle at 100% 0, rgba(27, 201, 159, 0.15), transparent 42%),\n #fff}.fga-home-feature-label{margin-bottom:1rem!important;color:#6b7280;font-size:0.72rem;font-weight:800;letter-spacing:0.14em;text-transform:uppercase}.fga-home-feature-card h3+p{max-width:28rem;margin-top:0.9rem;color:#5e6570;line-height:1.65}.fga-home-feature-links{display:flex;flex-wrap:wrap;gap:0 1.5rem;margin-top:3rem}.dark .fga-home-page,.dark .fga-home-intro h1,.dark .fga-home-section-heading h2,.dark .fga-home-features>h2,.dark .fga-home-step-summary h3,.dark .fga-home-feature-card h3{color:#f5f2ff}.dark .fga-home-intro{background:#20222a}.dark .fga-home-intro::after{opacity:0.55}.dark .fga-home-intro-description p,.dark .fga-home-relationship p,.dark .fga-home-section-heading p,.dark .fga-home-step-summary p,.dark .fga-home-feature-card h3+p{color:#c5c9d1}.dark .fga-home-relationship img{opacity:0.86;filter:invert(0.92) hue-rotate(180deg)}.dark .fga-home-step{border-color:rgba(255, 255, 255, 0.11);background:rgba(255, 255, 255, 0.025)}.dark .fga-home-step--featured{border-color:rgba(184, 166, 255, 0.18);background:rgba(139, 113, 223, 0.11)}.dark .fga-home-button{border-color:rgba(255, 255, 255, 0.22);color:#f5f2ff!important}.dark .fga-home-button:hover{border-color:rgb(var(--primary-light));background:rgb(var(--gray-900));box-shadow:0 0 0 3px rgb(var(--primary-light) / 0.14)}.dark .fga-home-button--primary,.dark .fga-home-button--primary:hover{border-color:rgb(var(--primary-light));background:rgb(var(--primary));color:#fff!important}.dark .fga-home-text-link,.dark .fga-home-resource-link{color:#f7f3fa!important}.dark .fga-home-link-text{text-decoration-color:#bc6dff}.dark .fga-home-step-resources{border-color:rgba(255, 255, 255, 0.14)}.dark .fga-home-feature-card,.dark .fga-home-feature-card--api{border-color:rgba(255, 255, 255, 0.11);background:radial-gradient(circle at 100% 0, rgba(139, 113, 223, 0.18), transparent 42%),\n rgba(255, 255, 255, 0.025)}@media (max-width: 960px){.fga-home-step{grid-template-columns:5rem minmax(0, 1fr)}.fga-home-step-resources{grid-column:2}}@media (max-width: 720px){.fga-home-page{padding-bottom:1rem}.fga-home-intro{min-height:0;padding:2.5rem 1.5rem;border-radius:0 0 1.75rem 1.75rem}.fga-home-intro::after{right:-15rem;width:34rem;opacity:0.55}.fga-home-relationship{margin:3.5rem 0 4.5rem}.fga-home-section-heading,.fga-home-feature-grid{grid-template-columns:1fr}.fga-home-step{grid-template-columns:1fr;min-height:0;padding:1.5rem;border-radius:1.5rem}.fga-home-step-resources{grid-column:1;padding-top:1.5rem;padding-left:0;border-top:1px solid rgba(89, 96, 108, 0.2);border-left:0}.fga-home-feature-card{min-height:19rem;border-radius:1.5rem}}#footer a[href=\"https://play.fga.dev/\"]{max-width:none;overflow:visible;text-overflow:clip;white-space:normal}@media (max-width: 400px){#footer div:has(>div>a[href=\"https://x.com/auth0\"]){justify-content:flex-start;flex-wrap:wrap;gap:0.75rem}}#footer div:has(>div>a[href=\"https://auth0.com/legal\"]){align-items:flex-start}#footer div:has(>a[href=\"https://auth0.com/legal\"]){flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:0}#footer div:has(>a[href=\"https://auth0.com/legal\"]) p{margin:0 1.5rem 0 0;color:#6b7280;font-size:0.875rem;font-weight:400}#footer div:has(>a[href=\"https://auth0.com/legal\"]) a+a::before{content:'โข';margin:0 0.35rem;color:#6b7280}@media (min-width: 640px){#footer div[style*=\"grid-template-columns\"]:has(a[href=\"https://auth0.com/legal\"]){grid-template-columns:repeat(3, minmax(0, 1fr))!important}#footer div[style*=\"grid-template-columns\"]>div:has(a[href=\"https://auth0.com/legal\"]){grid-column:1 / -1}}"},{"filePath":"styles/fga-guide-cards.css","content":"#content .fga-card-box{--fga-card-border: #bdc4cf;--fga-card-background: #fff;--fga-card-filled: #f0f1f3;--fga-card-icon-background: #eff0f2;box-sizing:border-box;min-width:0;margin:1.5rem 0;padding:2rem;border:1px solid var(--fga-card-border);border-radius:1.5rem;color:inherit;background:var(--fga-card-background)}.dark #content .fga-card-box{--fga-card-border: #55515f;--fga-card-background: #211f29;--fga-card-filled: #2c2934;--fga-card-icon-background: #37343f}#content .fga-card-box--filled{border-color:transparent;background:var(--fga-card-filled)}#content .fga-card-box--gradient{border-color:transparent;color:#fff;background:linear-gradient(90deg, #635dff 0.01%, #3885ff 100.01%)}#content .fga-card-box--compact{height:fit-content}#content .fga-card-box__content{display:flex;flex-direction:column;height:100%}#content .fga-card-box__title{display:block;margin-bottom:1rem;font-size:1.25rem;font-weight:500;line-height:1.3}#content .fga-card-box__title--center{margin-bottom:0;text-align:center}#content .fga-card-box__description{margin:0;line-height:1.5}#content .fga-card-box__icon-row{display:flex;gap:1.5rem;align-items:center;min-width:0}#content .fga-card-box__icon-row--center{flex-direction:column;justify-content:center;gap:0.625rem;text-align:center}#content .fga-card-box__icon{display:flex;flex:none;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border-radius:0.4rem;background:var(--fga-card-icon-background)}#content .fga-card-box__icon--large{width:3rem;height:3rem}#content .fga-card-box__icon img{display:block;width:100%;height:100%;margin:0;object-fit:contain}#content .fga-card-box__icon-label{font-size:1.125rem;line-height:1.55}#content .fga-card-box__icon-title{min-width:0;font-size:clamp(1.25rem, 2vw, 1.75rem);font-weight:500;line-height:1.3}#content .fga-card-box__children{min-width:0;font-size:1rem;line-height:1.75;overflow-wrap:anywhere}#content .fga-card-box__children>:first-child{margin-top:0}#content .fga-card-box__children>:last-child{margin-bottom:0}#content .fga-card-box__children :where(ul,ol){margin:0.5rem 0;padding-left:1.25rem}#content .fga-card-box__children :where(li,p){margin-top:0;margin-bottom:0.4rem}#content .fga-card-box__children--mono :where(ul,ol,li,p){font-size:0.875rem;line-height:1.45;letter-spacing:0.06em}#content .fga-card-box__children--small :where(ul,ol,li,p){font-size:0.875rem;line-height:1.35}#content .fga-card-box__links{margin:auto 0 0;padding:1rem 0 0;list-style:none}#content .fga-card-box__links li{padding-left:0}#content .fga-card-box__links li::before{display:none}#content .fga-card-box__links li+li{margin-top:0.3rem}#content .fga-card-box__links a{color:rgb(var(--primary));font-weight:500;text-decoration:none}#content .fga-card-box__links a:hover{text-decoration:underline}#content .fga-card-box__links a:focus-visible{outline:2px solid currentColor;outline-offset:3px}#content .fga-card-box--gradient .fga-card-box__links a{color:#fff}#content .fga-column-layout{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:2rem;min-width:0;margin:2rem 0}#content .fga-column-layout[data-cols=\"3\"]{grid-template-columns:repeat(3, minmax(0, 1fr))}#content .fga-column-layout[data-cols=\"4\"]{grid-template-columns:repeat(4, minmax(0, 1fr));gap:1rem}#content .fga-column-layout[data-cols=\"5\"]{grid-template-columns:repeat(5, minmax(0, 1fr));gap:1rem}#content .fga-column-layout>.fga-card-box{height:100%;margin:0}#content .fga-column-layout--overview{gap:1rem}#content .fga-overview-divider{margin:2rem 0;border:0;border-top:1px solid #dadfe8}.dark #content .fga-overview-divider{border-color:#55515f}#content .fga-column-layout[data-cols=\"2\"],#content .fga-column-layout[data-cols=\"3\"]{grid-template-columns:minmax(0, 1fr)}#content .fga-column-layout[data-cols=\"4\"],#content .fga-column-layout[data-cols=\"5\"]{grid-template-columns:repeat(2, minmax(0, 1fr))}#content .fga-column-layout--overview[data-cols=\"2\"]{grid-template-columns:repeat(2, minmax(0, 1fr))}#content .fga-column-layout--overview[data-cols=\"3\"]{grid-template-columns:repeat(3, minmax(0, 1fr))}@media (max-width: 1536px){#content .fga-column-layout--overview[data-cols=\"2\"],#content .fga-column-layout--overview[data-cols=\"3\"]{grid-template-columns:minmax(0, 1fr)}}#content .fga-related-section{margin:1.5rem 0}#content .fga-related-grid{display:grid;grid-template-columns:minmax(0, 1fr);gap:2rem;min-width:0;margin:1.5rem 0}#content .fga-related-card{display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:2rem;border:1px solid #bdc4cf;border-radius:1.5rem;color:inherit;text-decoration:none}.dark #content .fga-related-card{border-color:#55515f}#content .fga-related-card__title{margin-bottom:0.75rem;font-size:1.25rem;font-weight:500;line-height:1.3}#content .fga-related-card__description{font-weight:400}#content .fga-related-card__more{margin-top:1rem;color:rgb(var(--primary))}#content .fga-related-card:focus-visible{outline:2px solid rgb(var(--primary));outline-offset:3px}#content .fga-guide-details{min-width:0;margin:2rem 0;border:1px solid #bdc4cf;border-radius:1.5rem;overflow-wrap:anywhere}.dark #content .fga-guide-details{border-color:#55515f}#content .fga-guide-summary{display:block;position:relative;padding:2rem 3.5rem 2rem 2rem;cursor:pointer}#content .fga-guide-summary::-webkit-details-marker{display:none}#content .fga-guide-summary::after{position:absolute;top:2.5rem;right:2rem;width:0.65rem;height:0.65rem;border:solid currentColor;border-width:0 1.5px 1.5px 0;content:'';transform:rotate(45deg)}#content .fga-guide-details[open]>.fga-guide-summary::after{transform:rotate(225deg)}#content .fga-guide-summary>:first-child{margin-top:0}#content .fga-guide-summary>:last-child{margin-bottom:0}#content .fga-guide-summary:focus-visible{outline:2px solid rgb(var(--primary));outline-offset:3px}#content .fga-guide-details>:not(summary){margin-right:2rem;margin-left:2rem}#content .fga-guide-details>span:not(.fga-code-viewer__sr-only){display:block}#content .fga-guide-details[open]>:last-child{margin-bottom:2rem}#content .blue-highlight-text,#content .green-highlight-text,#content .yellow-highlight-text{padding:0.075rem 0.45rem;border-radius:0.15rem;font-size:0.75rem;font-weight:600;line-height:1.5;letter-spacing:0.05em;text-transform:uppercase;box-decoration-break:clone}#content .blue-highlight-text{color:#00407d;background:#ddebfd}#content .green-highlight-text{color:#004e4e;background:#def7f1}#content .yellow-highlight-text{color:#522c09;background:#fcf7e4}.dark #content .blue-highlight-text{color:#d5eaff;background:#234267}.dark #content .green-highlight-text{color:#d0fff0;background:#1e504a}.dark #content .yellow-highlight-text{color:#ffeac1;background:#634724}@media (max-width: 720px){#content .fga-card-box,#content .fga-related-card{padding:1.25rem}#content .fga-column-layout,#content .fga-column-layout[data-cols]{grid-template-columns:minmax(0, 1fr)}#content .fga-guide-summary{padding:1.25rem 3rem 1.25rem 1.25rem}#content .fga-guide-summary::after{top:1.75rem;right:1.5rem}#content .fga-guide-details>:not(summary){margin-right:1.25rem;margin-left:1.25rem}}"},{"filePath":"styles/fga-guide-promos.css","content":"#content .fga-guide-banner{box-sizing:border-box;display:flex;align-items:center;gap:2rem;min-width:0;margin:2rem 0;padding:2rem;border-radius:1.5rem;color:#1e212a;background:#f6f7fa;text-decoration:none;transition:box-shadow 0.2s ease}.dark #content .fga-guide-banner{color:#f5f4f8;background:#2c2934}#content .fga-guide-banner:hover{box-shadow:0 6px 12px rgb(0 0 0 / 12%)}#content .fga-guide-banner:focus-visible{outline:3px solid rgb(var(--primary));outline-offset:3px}#content .fga-guide-banner__icon{display:flex;flex:0 0 5.875rem;align-items:center;justify-content:center;width:5.875rem;height:5.875rem;border-radius:1.5rem;background:#fff}#content .fga-guide-banner__icon img{display:block;max-width:90%;max-height:80%;margin:0}#content .fga-guide-banner__content{display:flex;flex:1 1 auto;flex-direction:column;gap:0.5rem;min-width:0}#content .fga-guide-banner__title{font-size:clamp(1.5rem, 3vw, 2rem);font-weight:500;line-height:1.25}#content .fga-guide-banner__description{color:#42464d;line-height:1.5}.dark #content .fga-guide-banner__description{color:#d9d6e2}#content .fga-guide-banner__chevron{flex:none;margin-left:auto;color:#65676e}.dark #content .fga-guide-banner__chevron{color:#d9d6e2}#content .fga-image-caption{display:block;margin:0.5rem 0 1.5rem;color:#555b66;font-size:0.875rem;line-height:1.5;text-align:center}.dark #content .fga-image-caption{color:#c5c1d0}#content .fga-image-caption>:first-child{margin-top:0}#content .fga-image-caption>:last-child{margin-bottom:0}@media (max-width: 720px){#content .fga-guide-banner{gap:1rem;padding:1.25rem}#content .fga-guide-banner__icon{flex-basis:3.5rem;width:3.5rem;height:3.5rem;border-radius:0.9rem}#content .fga-guide-banner__title{font-size:1.25rem}}"},{"filePath":"styles/fga-viewers.css","content":".fga-code-viewer{--fga-code-surface: #faf8fc;--fga-code-header: #fff;--fga-code-border: #ddd5e7;--fga-code-default: #25202e;--fga-code-muted: #52505d;--fga-code-keyword: #555161;--fga-code-type: #6e238d;--fga-code-relation: #254489;--fga-code-assignable: #6921a0;--fga-code-error: #b42333;--fga-code-accent: #7621ad;overflow:hidden;margin:1rem 0;color:var(--fga-code-default);background:var(--fga-code-surface);border:1px solid var(--fga-code-border);border-radius:0.65rem;font-family:Inter, system-ui, sans-serif}.dark .fga-code-viewer,[data-theme=\"dark\"] .fga-code-viewer{--fga-code-surface: #1b1625;--fga-code-header: #241d30;--fga-code-border: #494050;--fga-code-default: #f2eef9;--fga-code-muted: #c3b9d2;--fga-code-keyword: #c6bdd5;--fga-code-type: #d8adff;--fga-code-relation: #9bbcff;--fga-code-assignable: #ebc1f8;--fga-code-error: #ff9b9b;--fga-code-accent: #ce9aff}.fga-code-viewer__actions{display:flex;align-items:center;background:var(--fga-code-header);border-bottom:1px solid var(--fga-code-border)}.fga-code-viewer__actions button{cursor:pointer;color:var(--fga-code-muted);background:transparent;border:0;font:inherit;font-size:0.8rem}.fga-code-viewer__actions{justify-content:space-between;min-height:2.35rem;padding:0.25rem 0.9rem;color:var(--fga-code-muted);font-size:0.8rem}.fga-code-viewer__actions button{padding:0.3rem 0.55rem;border:1px solid var(--fga-code-border);border-radius:0.3rem}.fga-code-viewer__actions .fga-code-viewer__copy{display:inline-flex;align-items:center;justify-content:center;flex:none;width:1.625rem;height:1.625rem;padding:0;border:0;border-radius:0.4rem}.fga-code-viewer__copy svg{width:1.125rem;height:1.125rem}.fga-code-viewer__actions .fga-code-viewer__copy:hover,.fga-code-viewer__actions .fga-code-viewer__copy[data-state=\"copied\"]{color:var(--fga-code-default);background:var(--fga-code-surface)}.fga-code-viewer__actions .fga-code-viewer__copy:focus-visible{outline:2px solid var(--fga-code-accent);outline-offset:2px}.fga-code-viewer__actions button:hover{color:var(--fga-code-accent)}.fga-code-viewer__actions button:focus-visible{outline:2px solid var(--fga-code-accent);outline-offset:2px}.fga-code-viewer__status{padding:1rem;color:inherit}#content .fga-pseudocode-toggle{display:flex;justify-content:flex-end;margin:1rem 0 -1rem}#content .fga-pseudocode-toggle button{padding:0.25rem 0;border:0;border-bottom:1px solid transparent;background:transparent;color:inherit;cursor:pointer;font:inherit;font-size:0.875rem;font-weight:700}#content .fga-pseudocode-toggle button:hover{border-bottom-color:currentColor}#content .fga-pseudocode-toggle button:focus-visible{outline:2px solid rgb(var(--primary));outline-offset:2px}.fga-code-viewer__code{padding:1rem;margin:0;max-height:36rem;overflow:auto;color:var(--fga-code-default);background:var(--fga-code-surface);font-family:var(--font-mono, ui-monospace, SFMono-Regular, monospace);font-size:0.875rem;line-height:1.65;tab-size:2;white-space:pre}.fga-code-token[data-token=\"comment\"]{color:var(--fga-code-muted)}.fga-code-token[data-token=\"keyword\"],.fga-code-token[data-token=\"condition-param-type\"]{color:var(--fga-code-keyword)}.fga-code-token[data-token=\"module\"],.fga-code-token[data-token=\"extend\"],.fga-code-token[data-token=\"type\"],.fga-code-token[data-token=\"condition\"]{color:var(--fga-code-type)}.fga-code-token[data-token=\"relation\"],.fga-code-token[data-token=\"condition-param\"]{color:var(--fga-code-relation)}.fga-code-token[data-token=\"directly-assignable\"]{color:var(--fga-code-assignable)}.fga-code-token[data-token=\"error\"]{color:var(--fga-code-error)}.fga-code-viewer__sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}@media (max-width: 600px){.fga-code-viewer__code{font-size:0.8rem}}"},{"filePath":"styles/fga-feedback-callout.css","content":"#content-area .fga-feedback{position:relative;box-sizing:border-box;margin:3rem 0;padding:2rem;overflow:hidden;border-radius:1.5rem;color:#fff;background:linear-gradient(333.17deg, #3ec6eb -1.51%, #635dff 101.22%);container-type:inline-size}#content-area .fga-feedback__title{margin:0 0 0.5rem;font-size:2rem;font-weight:500;line-height:2.5rem;letter-spacing:-0.03125rem;color:inherit}#content-area .fga-feedback__text{margin:0 0 1.125rem;font-size:1rem;line-height:1.5rem;color:inherit}#content-area .fga-feedback__link{display:inline-flex;align-items:center;gap:0.5rem;padding:0.3rem 1.1656rem;border-radius:0.5rem;color:#fff;background:#1e212a;font-size:1rem;font-weight:500;line-height:1.75rem;text-decoration:none;transition:background-color 250ms}#content-area .fga-feedback__link:hover{background:#42464d}#content-area .fga-feedback__link:focus-visible{outline:2px solid #fff;outline-offset:2px}#content-area .fga-feedback__illustration,#content-area .fga-feedback__pattern{display:none;position:absolute;max-width:none;height:auto;pointer-events:none}@container (min-width: 44rem){#content-area .fga-feedback__body{max-width:calc(50% - 1rem)}#content-area .fga-feedback__illustration{display:block;top:1rem;left:calc(50% + 1rem)}#content-area .fga-feedback__pattern{display:block;top:0;right:0}}@media print{#content-area .fga-feedback{display:none}}"}],"page":{"pagePath":"api/service/authorization-models/read-authorization-model","slug":"/api/service/authorization-models/read-authorization-model","pageMetadata":{"title":"Get an authorization model by its ID","description":"The ReadAuthorizationModel API returns an authorization model by its identifier.\nThe response returns the authorization model for the particular ID.\n\nAuthorization models in Auth0 FGA are [immutable](https://docs.fga.dev/modeling/immutable-models). You can create new versions, but you cannot delete or modify existing ones.\n\n## Example\n\nTo retrieve the authorization model with ID `01G5JAVJ41T49E9TT3SKVS7X1J` for the store, call the `GET` authorization-models by ID API with `01G5JAVJ41T49E9TT3SKVS7X1J` as the `id` path parameter. The API returns:\n```json\n{\n \"authorization_model\":{\n \"id\":\"01G5JAVJ41T49E9TT3SKVS7X1J\",\n \"type_definitions\":[\n {\n \"type\":\"user\"\n },\n {\n \"type\":\"document\",\n \"relations\":{\n \"reader\":{\n \"union\":{\n \"child\":[\n {\n \"this\":{}\n },\n {\n \"computedUserset\":{\n \"object\":\"\",\n \"relation\":\"writer\"\n }\n }\n ]\n }\n },\n \"writer\":{\n \"this\":{}\n }\n }\n }\n ]\n }\n}\n```\nIn the above example, there are 2 types (`user` and `document`). The `document` type has 2 relations (`writer` and `reader`).","deprecated":null,"version":null,"sidebarTitle":"Read authorization model","openapi":"https://api.us1.fga.dev/docs/openapi.json get /stores/{store_id}/authorization-models/{id}","href":"/api/service/authorization-models/read-authorization-model","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n h2: \"h2\",\n p: \"p\",\n pre: \"pre\",\n span: \"span\",\n ..._provideComponents(),\n ...props.components\n }, {CodeBlock} = _components;\n if (!CodeBlock) _missingMdxReference(\"CodeBlock\", true);\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"The ReadAuthorizationModel API returns an authorization model by its identifier.\\nThe response returns the authorization model for the particular ID.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Authorization models in Auth0 FGA are \", _jsx(_components.a, {\n href: \"https://docs.fga.dev/modeling/immutable-models\",\n children: \"immutable\"\n }), \". You can create new versions, but you cannot delete or modify existing ones.\"]\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Example\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"To retrieve the authorization model with ID \", _jsx(_components.code, {\n children: \"01G5JAVJ41T49E9TT3SKVS7X1J\"\n }), \" for the store, call the \", _jsx(_components.code, {\n children: \"GET\"\n }), \" authorization-models by ID API with \", _jsx(_components.code, {\n children: \"01G5JAVJ41T49E9TT3SKVS7X1J\"\n }), \" as the \", _jsx(_components.code, {\n children: \"id\"\n }), \" path parameter. The API returns:\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"33\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"33\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"authorization_model\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"01G5JAVJ41T49E9TT3SKVS7X1J\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type_definitions\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":[\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"user\\\"\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"document\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"relations\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"reader\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"union\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"child\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":[\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"this\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":{}\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" {\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"computedUserset\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"object\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"relation\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"writer\\\"\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" ]\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" },\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"writer\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"this\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":{}\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" ]\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"In the above example, there are 2 types (\", _jsx(_components.code, {\n children: \"user\"\n }), \" and \", _jsx(_components.code, {\n children: \"document\"\n }), \"). The \", _jsx(_components.code, {\n children: \"document\"\n }), \" type has 2 relations (\", _jsx(_components.code, {\n children: \"writer\"\n }), \" and \", _jsx(_components.code, {\n children: \"reader\"\n }), \").\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\nfunction _missingMdxReference(id, component) {\n throw new Error(\"Expected \" + (component ? \"component\" : \"object\") + \" `\" + id + \"` to be defined: you likely forgot to import, pass, or provide it.\");\n}\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get an authorization model by its ID","description":"The ReadAuthorizationModel API returns an authorization model by its identifier.\nThe response returns the authorization model for the particular ID.\n\nAuthorization models in Auth0 FGA are [immutable](https://docs.fga.dev/modeling/immutable-models). You can create new versions, but you cannot delete or modify existing ones.\n\n## Example\n\nTo retrieve the authorization model with ID `01G5JAVJ41T49E9TT3SKVS7X1J` for the store, call the `GET` authorization-models by ID API with `01G5JAVJ41T49E9TT3SKVS7X1J` as the `id` path parameter. The API returns:\n```json\n{\n \"authorization_model\":{\n \"id\":\"01G5JAVJ41T49E9TT3SKVS7X1J\",\n \"type_definitions\":[\n {\n \"type\":\"user\"\n },\n {\n \"type\":\"document\",\n \"relations\":{\n \"reader\":{\n \"union\":{\n \"child\":[\n {\n \"this\":{}\n },\n {\n \"computedUserset\":{\n \"object\":\"\",\n \"relation\":\"writer\"\n }\n }\n ]\n }\n },\n \"writer\":{\n \"this\":{}\n }\n }\n }\n ]\n }\n}\n```\nIn the above example, there are 2 types (`user` and `document`). The `document` type has 2 relations (`writer` and `reader`).","deprecated":null,"version":null,"sidebarTitle":"Read authorization model","openapi":"https://api.us1.fga.dev/docs/openapi.json get /stores/{store_id}/authorization-models/{id}","href":"/api/service/authorization-models/read-authorization-model","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/auth0-fga/b205cb6e36be0d36/assets/fga-viewers/fga-codegen.js","/_mintlify/custom/auth0-fga/1a02bc05134b48fa/assets/fga-viewers/fga-viewer.js","/_mintlify/custom/auth0-fga/51a26d5f03535513/assets/fga-viewers/openfga-dsl-highlight.js","/_mintlify/custom/auth0-fga/5b58fe698ec1960c/global.js","/_mintlify/custom/auth0-fga/e81b038d0229a86f/feedback-callout.js","/_mintlify/custom/auth0-fga/557a737237096275/search-compat.js"],"openApiReferenceData":{"operation":{"description":"The ReadAuthorizationModel API returns an authorization model by its identifier.\nThe response returns the authorization model for the particular ID.\n\nAuthorization models in Auth0 FGA are [immutable](https://docs.fga.dev/modeling/immutable-models). You can create new versions, but you cannot delete or modify existing ones.\n\n## Example\n\nTo retrieve the authorization model with ID `01G5JAVJ41T49E9TT3SKVS7X1J` for the store, call the `GET` authorization-models by ID API with `01G5JAVJ41T49E9TT3SKVS7X1J` as the `id` path parameter. The API returns:\n```json\n{\n \"authorization_model\":{\n \"id\":\"01G5JAVJ41T49E9TT3SKVS7X1J\",\n \"type_definitions\":[\n {\n \"type\":\"user\"\n },\n {\n \"type\":\"document\",\n \"relations\":{\n \"reader\":{\n \"union\":{\n \"child\":[\n {\n \"this\":{}\n },\n {\n \"computedUserset\":{\n \"object\":\"\",\n \"relation\":\"writer\"\n }\n }\n ]\n }\n },\n \"writer\":{\n \"this\":{}\n }\n }\n }\n ]\n }\n}\n```\nIn the above example, there are 2 types (`user` and `document`). The `document` type has 2 relations (`writer` and `reader`).","operationId":"ReadAuthorizationModel","parameters":["53b34e9d-1554-492e-b8b0-3a2577be9e95","7c4ff9ee-1a74-4302-a118-12a9dde9025f"],"responses":{"200":"beb7babf-f592-4a50-93a6-5331f67ee480","400":"cdeaef64-0036-44e5-8778-6efd50b552bf","401":"9db49e75-d54f-4f63-b538-3820fc182e8b","403":"a8a44b9b-9819-455a-b9f9-384e6f54c7c6","404":"ec606a81-7450-4291-8e8b-2286bc9b1414","409":"c3717fb4-37c2-4234-b4f4-b5cc4f32175a","422":"e0992d00-34b7-4c75-9fa5-f2ed7e325c05","429":"f9a120d7-53b0-46d6-b1d0-eda2c40df49c","500":"08e3592f-03e3-4a07-ac50-d66881bb507f"},"security":["46828139-9a33-4050-a3fa-d30ef9cbfe3a"],"summary":"Get an authorization model by its ID","tags":["Authorization Models"],"x-ratelimit":{"enterprise_basic_v1":"30 RPM","free":"30 RPM"},"x-codeSamples":[{"lang":"javascript","label":"Node.js","source":"const { CredentialsMethod, OpenFgaClient, ConsistencyPreference } = require('@openfga/sdk');\n\nconst fgaClient = new OpenFgaClient({\n apiUrl: process.env.FGA_API_URL, // https://api.us1.fga.dev, or your store's eu1/au1 region\n storeId: process.env.FGA_STORE_ID,\n authorizationModelId: process.env.FGA_MODEL_ID,\n credentials: {\n method: CredentialsMethod.ClientCredentials,\n config: {\n apiTokenIssuer: process.env.FGA_API_TOKEN_ISSUER, // auth.fga.dev\n apiAudience: process.env.FGA_API_AUDIENCE, // URL for your store's region\n clientId: process.env.FGA_CLIENT_ID,\n clientSecret: process.env.FGA_CLIENT_SECRET,\n },\n },\n});\n\nasync function main() {\n const response = await fgaClient.readAuthorizationModel();\n}\n\nmain().catch((error) => {\n console.error(error);\n process.exitCode = 1;\n});"},{"lang":"go","label":"Go","source":"package main\n\nimport (\n \"context\"\n \"os\"\n . \"github.com/openfga/go-sdk/client\"\n \"github.com/openfga/go-sdk/credentials\"\n)\n\n// Configure FGA_API_URL and FGA_API_AUDIENCE for your store's us1/eu1/au1 region.\n// Set FGA_STORE_ID, FGA_MODEL_ID, FGA_API_TOKEN_ISSUER, FGA_CLIENT_ID, and FGA_CLIENT_SECRET.\nfunc main() {\n fgaClient, err := NewSdkClient(\u0026ClientConfiguration{\n ApiUrl: os.Getenv(\"FGA_API_URL\"),\n StoreId: os.Getenv(\"FGA_STORE_ID\"),\n AuthorizationModelId: os.Getenv(\"FGA_MODEL_ID\"),\n Credentials: \u0026credentials.Credentials{\n Method: credentials.CredentialsMethodClientCredentials,\n Config: \u0026credentials.Config{\n ClientCredentialsApiTokenIssuer: os.Getenv(\"FGA_API_TOKEN_ISSUER\"),\n ClientCredentialsApiAudience: os.Getenv(\"FGA_API_AUDIENCE\"),\n ClientCredentialsClientId: os.Getenv(\"FGA_CLIENT_ID\"),\n ClientCredentialsClientSecret: os.Getenv(\"FGA_CLIENT_SECRET\"),\n },\n },\n })\n if err != nil { panic(err) }\n\n response, err := fgaClient.ReadAuthorizationModel(context.Background()).Execute()\n if err != nil {\n panic(err)\n }\n _ = response\n}"},{"lang":"csharp","label":".NET","source":"using System.Collections.Generic;\nusing OpenFga.Sdk.Client;\nusing OpenFga.Sdk.Client.Model;\nusing OpenFga.Sdk.Configuration;\nusing OpenFga.Sdk.Model;\nusing Environment = System.Environment;\n\n// FGA_API_URL and FGA_API_AUDIENCE must match the store's us1/eu1/au1 region.\nvar fgaClient = new OpenFgaClient(new ClientConfiguration() {\n ApiUrl = Environment.GetEnvironmentVariable(\"FGA_API_URL\"),\n StoreId = Environment.GetEnvironmentVariable(\"FGA_STORE_ID\"),\n AuthorizationModelId = Environment.GetEnvironmentVariable(\"FGA_MODEL_ID\"),\n Credentials = new Credentials() {\n Method = CredentialsMethod.ClientCredentials,\n Config = new CredentialsConfig() {\n ApiTokenIssuer = Environment.GetEnvironmentVariable(\"FGA_API_TOKEN_ISSUER\"),\n ApiAudience = Environment.GetEnvironmentVariable(\"FGA_API_AUDIENCE\"),\n ClientId = Environment.GetEnvironmentVariable(\"FGA_CLIENT_ID\"),\n ClientSecret = Environment.GetEnvironmentVariable(\"FGA_CLIENT_SECRET\"),\n }\n }\n});\n\nvar response = await fgaClient.ReadAuthorizationModel();"},{"lang":"python","label":"Python","source":"import asyncio\nimport os\nfrom openfga_sdk.client import OpenFgaClient, ClientConfiguration\nfrom openfga_sdk.client.models import ClientCheckRequest, ClientTuple\nfrom openfga_sdk.models import RelationshipCondition\nfrom openfga_sdk.credentials import Credentials, CredentialConfiguration\n\n# FGA_API_URL and FGA_API_AUDIENCE must match the store's us1/eu1/au1 region.\ncredentials = Credentials(\n method='client_credentials',\n configuration=CredentialConfiguration(\n api_issuer=os.environ.get('FGA_API_TOKEN_ISSUER'),\n api_audience=os.environ.get('FGA_API_AUDIENCE'),\n client_id=os.environ.get('FGA_CLIENT_ID'),\n client_secret=os.environ.get('FGA_CLIENT_SECRET'),\n ),\n)\n\nasync def main():\n configuration = ClientConfiguration(\n api_url=os.environ.get('FGA_API_URL'),\n store_id=os.environ.get('FGA_STORE_ID'),\n authorization_model_id=os.environ.get('FGA_MODEL_ID'),\n credentials=credentials,\n )\n async with OpenFgaClient(configuration) as fga_client:\n response = await fga_client.read_authorization_model()\n\nasyncio.run(main())"},{"lang":"java","label":"Java","source":"import dev.openfga.sdk.api.client.OpenFgaClient;\nimport dev.openfga.sdk.api.configuration.ClientConfiguration;\nimport dev.openfga.sdk.api.configuration.ClientCredentials;\nimport dev.openfga.sdk.api.configuration.Credentials;\nimport dev.openfga.sdk.api.configuration.ClientCheckOptions;\nimport dev.openfga.sdk.api.configuration.ClientBatchCheckOptions;\nimport dev.openfga.sdk.api.configuration.ClientWriteOptions;\nimport dev.openfga.sdk.api.configuration.ClientListObjectsOptions;\nimport dev.openfga.sdk.api.configuration.ClientListUsersOptions;\nimport dev.openfga.sdk.api.client.model.*;\nimport dev.openfga.sdk.api.model.*;\nimport java.util.List;\nimport java.util.Map;\n\n// FGA_API_URL and FGA_API_AUDIENCE must match the store's us1/eu1/au1 region.\npublic class Example {\n public static void main(String[] args) throws Exception {\n var config = new ClientConfiguration()\n .apiUrl(System.getenv(\"FGA_API_URL\"))\n .storeId(System.getenv(\"FGA_STORE_ID\"))\n .authorizationModelId(System.getenv(\"FGA_MODEL_ID\"))\n .credentials(new Credentials(new ClientCredentials()\n .apiTokenIssuer(System.getenv(\"FGA_API_TOKEN_ISSUER\"))\n .apiAudience(System.getenv(\"FGA_API_AUDIENCE\"))\n .clientId(System.getenv(\"FGA_CLIENT_ID\"))\n .clientSecret(System.getenv(\"FGA_CLIENT_SECRET\"))));\n var fgaClient = new OpenFgaClient(config);\n\n var response = fgaClient.readAuthorizationModel().get();\n }\n}"},{"lang":"bash","label":"curl","source":"# Set FGA_API_URL to your store region (https://api.us1.fga.dev, or eu1/au1).\n# Set FGA_STORE_ID and obtain FGA_BEARER_TOKEN with the client credentials grant.\n# See /integration/getting-your-api-keys; never put client secrets in source code.\n# Set FGA_MODEL_ID to the authorization model ID.\n\ncurl -X GET \"$FGA_API_URL/stores/$FGA_STORE_ID/authorization-models/$FGA_MODEL_ID\" \\\n -H \"authorization: Bearer $FGA_BEARER_TOKEN\""}],"x-mint":{"href":"/api/service/authorization-models/read-authorization-model"},"method":"get","type":"path","servers":["eff403a7-e0d5-4610-9544-067aa4b1f15c","42e2fc68-4200-4e8e-9714-aba1d79d2b3f","e1646084-8df8-43f3-b219-009e387ee8fe"],"path":"/stores/{store_id}/authorization-models/{id}","baseUrlOptions":["https://api.us1.fga.dev","https://api.eu1.fga.dev","https://api.au1.fga.dev"],"title":"Get an authorization model by its ID","codeSamples":[{"label":"Node.js","lang":"javascript","source":"const { CredentialsMethod, OpenFgaClient, ConsistencyPreference } = require('@openfga/sdk');\n\nconst fgaClient = new OpenFgaClient({\n apiUrl: process.env.FGA_API_URL, // https://api.us1.fga.dev, or your store's eu1/au1 region\n storeId: process.env.FGA_STORE_ID,\n authorizationModelId: process.env.FGA_MODEL_ID,\n credentials: {\n method: CredentialsMethod.ClientCredentials,\n config: {\n apiTokenIssuer: process.env.FGA_API_TOKEN_ISSUER, // auth.fga.dev\n apiAudience: process.env.FGA_API_AUDIENCE, // URL for your store's region\n clientId: process.env.FGA_CLIENT_ID,\n clientSecret: process.env.FGA_CLIENT_SECRET,\n },\n },\n});\n\nasync function main() {\n const response = await fgaClient.readAuthorizationModel();\n}\n\nmain().catch((error) => {\n console.error(error);\n process.exitCode = 1;\n});"},{"label":"Go","lang":"go","source":"package main\n\nimport (\n \"context\"\n \"os\"\n . \"github.com/openfga/go-sdk/client\"\n \"github.com/openfga/go-sdk/credentials\"\n)\n\n// Configure FGA_API_URL and FGA_API_AUDIENCE for your store's us1/eu1/au1 region.\n// Set FGA_STORE_ID, FGA_MODEL_ID, FGA_API_TOKEN_ISSUER, FGA_CLIENT_ID, and FGA_CLIENT_SECRET.\nfunc main() {\n fgaClient, err := NewSdkClient(\u0026ClientConfiguration{\n ApiUrl: os.Getenv(\"FGA_API_URL\"),\n StoreId: os.Getenv(\"FGA_STORE_ID\"),\n AuthorizationModelId: os.Getenv(\"FGA_MODEL_ID\"),\n Credentials: \u0026credentials.Credentials{\n Method: credentials.CredentialsMethodClientCredentials,\n Config: \u0026credentials.Config{\n ClientCredentialsApiTokenIssuer: os.Getenv(\"FGA_API_TOKEN_ISSUER\"),\n ClientCredentialsApiAudience: os.Getenv(\"FGA_API_AUDIENCE\"),\n ClientCredentialsClientId: os.Getenv(\"FGA_CLIENT_ID\"),\n ClientCredentialsClientSecret: os.Getenv(\"FGA_CLIENT_SECRET\"),\n },\n },\n })\n if err != nil { panic(err) }\n\n response, err := fgaClient.ReadAuthorizationModel(context.Background()).Execute()\n if err != nil {\n panic(err)\n }\n _ = response\n}"},{"label":".NET","lang":"csharp","source":"using System.Collections.Generic;\nusing OpenFga.Sdk.Client;\nusing OpenFga.Sdk.Client.Model;\nusing OpenFga.Sdk.Configuration;\nusing OpenFga.Sdk.Model;\nusing Environment = System.Environment;\n\n// FGA_API_URL and FGA_API_AUDIENCE must match the store's us1/eu1/au1 region.\nvar fgaClient = new OpenFgaClient(new ClientConfiguration() {\n ApiUrl = Environment.GetEnvironmentVariable(\"FGA_API_URL\"),\n StoreId = Environment.GetEnvironmentVariable(\"FGA_STORE_ID\"),\n AuthorizationModelId = Environment.GetEnvironmentVariable(\"FGA_MODEL_ID\"),\n Credentials = new Credentials() {\n Method = CredentialsMethod.ClientCredentials,\n Config = new CredentialsConfig() {\n ApiTokenIssuer = Environment.GetEnvironmentVariable(\"FGA_API_TOKEN_ISSUER\"),\n ApiAudience = Environment.GetEnvironmentVariable(\"FGA_API_AUDIENCE\"),\n ClientId = Environment.GetEnvironmentVariable(\"FGA_CLIENT_ID\"),\n ClientSecret = Environment.GetEnvironmentVariable(\"FGA_CLIENT_SECRET\"),\n }\n }\n});\n\nvar response = await fgaClient.ReadAuthorizationModel();"},{"label":"Python","lang":"python","source":"import asyncio\nimport os\nfrom openfga_sdk.client import OpenFgaClient, ClientConfiguration\nfrom openfga_sdk.client.models import ClientCheckRequest, ClientTuple\nfrom openfga_sdk.models import RelationshipCondition\nfrom openfga_sdk.credentials import Credentials, CredentialConfiguration\n\n# FGA_API_URL and FGA_API_AUDIENCE must match the store's us1/eu1/au1 region.\ncredentials = Credentials(\n method='client_credentials',\n configuration=CredentialConfiguration(\n api_issuer=os.environ.get('FGA_API_TOKEN_ISSUER'),\n api_audience=os.environ.get('FGA_API_AUDIENCE'),\n client_id=os.environ.get('FGA_CLIENT_ID'),\n client_secret=os.environ.get('FGA_CLIENT_SECRET'),\n ),\n)\n\nasync def main():\n configuration = ClientConfiguration(\n api_url=os.environ.get('FGA_API_URL'),\n store_id=os.environ.get('FGA_STORE_ID'),\n authorization_model_id=os.environ.get('FGA_MODEL_ID'),\n credentials=credentials,\n )\n async with OpenFgaClient(configuration) as fga_client:\n response = await fga_client.read_authorization_model()\n\nasyncio.run(main())"},{"label":"Java","lang":"java","source":"import dev.openfga.sdk.api.client.OpenFgaClient;\nimport dev.openfga.sdk.api.configuration.ClientConfiguration;\nimport dev.openfga.sdk.api.configuration.ClientCredentials;\nimport dev.openfga.sdk.api.configuration.Credentials;\nimport dev.openfga.sdk.api.configuration.ClientCheckOptions;\nimport dev.openfga.sdk.api.configuration.ClientBatchCheckOptions;\nimport dev.openfga.sdk.api.configuration.ClientWriteOptions;\nimport dev.openfga.sdk.api.configuration.ClientListObjectsOptions;\nimport dev.openfga.sdk.api.configuration.ClientListUsersOptions;\nimport dev.openfga.sdk.api.client.model.*;\nimport dev.openfga.sdk.api.model.*;\nimport java.util.List;\nimport java.util.Map;\n\n// FGA_API_URL and FGA_API_AUDIENCE must match the store's us1/eu1/au1 region.\npublic class Example {\n public static void main(String[] args) throws Exception {\n var config = new ClientConfiguration()\n .apiUrl(System.getenv(\"FGA_API_URL\"))\n .storeId(System.getenv(\"FGA_STORE_ID\"))\n .authorizationModelId(System.getenv(\"FGA_MODEL_ID\"))\n .credentials(new Credentials(new ClientCredentials()\n .apiTokenIssuer(System.getenv(\"FGA_API_TOKEN_ISSUER\"))\n .apiAudience(System.getenv(\"FGA_API_AUDIENCE\"))\n .clientId(System.getenv(\"FGA_CLIENT_ID\"))\n .clientSecret(System.getenv(\"FGA_CLIENT_SECRET\"))));\n var fgaClient = new OpenFgaClient(config);\n\n var response = fgaClient.readAuthorizationModel().get();\n }\n}"},{"label":"curl","lang":"bash","source":"# Set FGA_API_URL to your store region (https://api.us1.fga.dev, or eu1/au1).\n# Set FGA_STORE_ID and obtain FGA_BEARER_TOKEN with the client credentials grant.\n# See /integration/getting-your-api-keys; never put client secrets in source code.\n# Set FGA_MODEL_ID to the authorization model ID.\n\ncurl -X GET \"$FGA_API_URL/stores/$FGA_STORE_ID/authorization-models/$FGA_MODEL_ID\" \\\n -H \"authorization: Bearer $FGA_BEARER_TOKEN\""}],"requiredOnlyExamples":false,"disableCodeSampleGeneration":true,"requestExampleType":"codeSamples","responseExampleType":"generated","disableProxy":true,"urlDisplay":"full"},"dependencies":{"parameters":{"53b34e9d-1554-492e-b8b0-3a2577be9e95":{"in":"path","name":"store_id","required":true,"schema":{"type":"string","isRequired":true,"uniqueKey":"","typeLabel":"string"}},"7c4ff9ee-1a74-4302-a118-12a9dde9025f":{"in":"path","name":"id","required":true,"schema":{"type":"string","isRequired":true,"uniqueKey":"","typeLabel":"string"}}},"responses":{"beb7babf-f592-4a50-93a6-5331f67ee480":{"content":{"application/json":{"schema":{"properties":{"authorization_model":{"properties":{"id":{"example":"01G5JAVJ41T49E9TT3SKVS7X1J","type":"string","isRequired":true,"uniqueKey":"authorization_model.id","typeLabel":"string"},"schema_version":{"type":"string","isRequired":true,"uniqueKey":"authorization_model.schema_version","typeLabel":"string"},"type_definitions":{"example":[{"type":"user"},{"metadata":{"relations":{"reader":{"directly_related_user_types":[{"type":"user"}]},"writer":{"directly_related_user_types":[{"type":"user"}]}}},"relations":{"reader":{"union":{"child":[{"this":{}},{"computedUserset":{"object":"","relation":"writer"}}]}},"writer":{"this":{}}},"type":"document"}],"items":{"properties":{"type":{"example":"document","type":"string","isRequired":true,"uniqueKey":"authorization_model.type_definitions.items.[INDEX].type","typeLabel":"string"},"metadata":{"type":"object","description":"A map whose keys are the name of the relation and whose value is the Metadata for that relation.\nIt also holds information around the module name and source file if this model was constructed\nfrom a modular model.","properties":{"module":{"type":"string","uniqueKey":"authorization_model.type_definitions.items.[INDEX].metadata.module","typeLabel":"string"},"relations":{"additionalProperties":{"properties":{"directly_related_user_types":{"items":{"description":"RelationReference represents a relation of a particular object type (e.g. 'document#viewer').","properties":{"type":{"example":"group","type":"string","isRequired":true,"uniqueKey":"authorization_model.type_definitions.items.[INDEX].metadata.relations.additionalProperties.directly_related_user_types.items.[INDEX].type","typeLabel":"string"},"condition":{"description":"The name of a condition that is enforced over the allowed relation.","type":"string","uniqueKey":"authorization_model.type_definitions.items.[INDEX].metadata.relations.additionalProperties.directly_related_user_types.items.[INDEX].condition","typeLabel":"string"},"relation":{"example":"member","type":"string","uniqueKey":"authorization_model.type_definitions.items.[INDEX].metadata.relations.additionalProperties.directly_related_user_types.items.[INDEX].relation","typeLabel":"string"},"wildcard":{"type":"object","uniqueKey":"authorization_model.type_definitions.items.[INDEX].metadata.relations.additionalProperties.directly_related_user_types.items.[INDEX].wildcard","typeLabel":"object"}},"required":["type"],"type":"object","uniqueKey":"authorization_model.type_definitions.items.[INDEX].metadata.relations.additionalProperties.directly_related_user_types.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"authorization_model.type_definitions.items.[INDEX].metadata.relations.additionalProperties.directly_related_user_types","typeLabel":"object[]"},"module":{"type":"string","uniqueKey":"authorization_model.type_definitions.items.[INDEX].metadata.relations.additionalProperties.module","typeLabel":"string"},"source_info":{"properties":{"file":{"type":"string","uniqueKey":"authorization_model.type_definitions.items.[INDEX].metadata.relations.additionalProperties.source_info.file","typeLabel":"string"}},"type":"object","uniqueKey":"authorization_model.type_definitions.items.[INDEX].metadata.relations.additionalProperties.source_info","typeLabel":"object"}},"type":"object","uniqueKey":"authorization_model.type_definitions.items.[INDEX].metadata.relations.additionalProperties","typeLabel":"object"},"type":"object","uniqueKey":"authorization_model.type_definitions.items.[INDEX].metadata.relations","typeLabel":"object"},"source_info":{"properties":{"file":{"type":"string","uniqueKey":"authorization_model.type_definitions.items.[INDEX].metadata.source_info.file","typeLabel":"string"}},"type":"object","uniqueKey":"authorization_model.type_definitions.items.[INDEX].metadata.source_info","typeLabel":"object"}},"uniqueKey":"authorization_model.type_definitions.items.[INDEX].metadata","typeLabel":"object"},"relations":{"additionalProperties":{"properties":{"computedUserset":{"properties":{"object":{"type":"string","uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.computedUserset.object","typeLabel":"string"},"relation":{"type":"string","uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.computedUserset.relation","typeLabel":"string"}},"type":"object","uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.computedUserset","typeLabel":"object"},"difference":{"properties":{"base":{"oneOf":[{"$circularRef":"64a79d3c-cfda-4837-ac34-2c9934f69584","isRequired":true}],"isRequired":true,"uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.difference.base","typeLabel":"any"},"subtract":{"oneOf":[{"$circularRef":"64a79d3c-cfda-4837-ac34-2c9934f69584","isRequired":true}],"isRequired":true,"uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.difference.subtract","typeLabel":"any"}},"required":["base","subtract"],"type":"object","uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.difference","typeLabel":"object"},"intersection":{"properties":{"child":{"items":{"$circularRef":"64a79d3c-cfda-4837-ac34-2c9934f69584"},"type":"array","isRequired":true,"uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.intersection.child","typeLabel":"array"}},"required":["child"],"type":"object","uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.intersection","typeLabel":"object"},"this":{"description":"A DirectUserset is a sentinel message for referencing\nthe direct members specified by an object/relation mapping.","type":"object","uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.this","typeLabel":"object"},"tupleToUserset":{"properties":{"computedUserset":{"properties":{"object":{"type":"string","uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.tupleToUserset.computedUserset.object","typeLabel":"string"},"relation":{"type":"string","uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.tupleToUserset.computedUserset.relation","typeLabel":"string"}},"type":"object","isRequired":true,"uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.tupleToUserset.computedUserset","typeLabel":"object"},"tupleset":{"type":"object","title":"The target object/relation","properties":{"object":{"type":"string","uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.tupleToUserset.tupleset.object","typeLabel":"string"},"relation":{"type":"string","uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.tupleToUserset.tupleset.relation","typeLabel":"string"}},"isRequired":true,"uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.tupleToUserset.tupleset","typeLabel":"The target object/relation ยท object"}},"required":["tupleset","computedUserset"],"type":"object","uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.tupleToUserset","typeLabel":"object"},"union":{"properties":{"child":{"items":{"$circularRef":"64a79d3c-cfda-4837-ac34-2c9934f69584"},"type":"array","isRequired":true,"uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.union.child","typeLabel":"array"}},"required":["child"],"type":"object","uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties.union","typeLabel":"object"}},"type":"object","uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations.additionalProperties","typeLabel":"object"},"example":{"reader":{"union":{"child":[{"this":{}},{"computedUserset":{"object":"","relation":"writer"}}]}},"writer":{"this":{}}},"type":"object","uniqueKey":"authorization_model.type_definitions.items.[INDEX].relations","typeLabel":"object"}},"required":["type"],"type":"object","uniqueKey":"authorization_model.type_definitions.items.[INDEX]","typeLabel":"object"},"type":"array","isRequired":true,"uniqueKey":"authorization_model.type_definitions","typeLabel":"object[]"},"conditions":{"additionalProperties":{"properties":{"expression":{"description":"A Google CEL expression, expressed as a string.","type":"string","isRequired":true,"uniqueKey":"authorization_model.conditions.additionalProperties.expression","typeLabel":"string"},"name":{"title":"A unique name for the condition","type":"string","isRequired":true,"uniqueKey":"authorization_model.conditions.additionalProperties.name","typeLabel":"string"},"metadata":{"properties":{"module":{"type":"string","uniqueKey":"authorization_model.conditions.additionalProperties.metadata.module","typeLabel":"string"},"source_info":{"properties":{"file":{"type":"string","uniqueKey":"authorization_model.conditions.additionalProperties.metadata.source_info.file","typeLabel":"string"}},"type":"object","uniqueKey":"authorization_model.conditions.additionalProperties.metadata.source_info","typeLabel":"object"}},"type":"object","uniqueKey":"authorization_model.conditions.additionalProperties.metadata","typeLabel":"object"},"parameters":{"additionalProperties":{"properties":{"type_name":{"default":"TYPE_NAME_UNSPECIFIED","enum":["TYPE_NAME_UNSPECIFIED","TYPE_NAME_ANY","TYPE_NAME_BOOL","TYPE_NAME_STRING","TYPE_NAME_INT","TYPE_NAME_UINT","TYPE_NAME_DOUBLE","TYPE_NAME_DURATION","TYPE_NAME_TIMESTAMP","TYPE_NAME_MAP","TYPE_NAME_LIST","TYPE_NAME_IPADDRESS"],"type":"string","isRequired":true,"uniqueKey":"authorization_model.conditions.additionalProperties.parameters.additionalProperties.type_name","typeLabel":"enum\u003cstring>"},"generic_types":{"items":{"$circularRef":"229b9f9a-3b17-446b-82ad-f08c9ce58769"},"type":"array","uniqueKey":"authorization_model.conditions.additionalProperties.parameters.additionalProperties.generic_types","typeLabel":"array"}},"required":["type_name"],"type":"object","uniqueKey":"authorization_model.conditions.additionalProperties.parameters.additionalProperties","typeLabel":"object"},"description":"A map of parameter names to the parameter's defined type reference.","type":"object","uniqueKey":"authorization_model.conditions.additionalProperties.parameters","typeLabel":"object"}},"required":["name","expression"],"type":"object","uniqueKey":"authorization_model.conditions.additionalProperties","typeLabel":"object"},"type":"object","uniqueKey":"authorization_model.conditions","typeLabel":"object"}},"required":["id","schema_version","type_definitions"],"type":"object","uniqueKey":"authorization_model","typeLabel":"object"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"authorization_model":{"id":"01G5JAVJ41T49E9TT3SKVS7X1J","schema_version":"\u003cstring>","type_definitions":[{"type":"user"},{"metadata":{"relations":{"reader":{"directly_related_user_types":[{"type":"user"}]},"writer":{"directly_related_user_types":[{"type":"user"}]}}},"relations":{"reader":{"union":{"child":[{"this":{}},{"computedUserset":{"object":"","relation":"writer"}}]}},"writer":{"this":{}}},"type":"document"}],"conditions":{}}}}},"exampleType":"generated"}},"description":"A successful response.","exampleType":"generated"},"cdeaef64-0036-44e5-8778-6efd50b552bf":{"content":{"application/json":{"schema":{"example":{"code":"validation_error","message":"Generic validation error"},"properties":{"code":{"default":"no_error","description":"- no_error: no error\n - validation_error: generic validation error.\n - authorization_model_not_found: authorization model not found.\n - authorization_model_resolution_too_complex: too many rewrite rules to be resolved.\n - invalid_write_input: invalid write input.\n - cannot_allow_duplicate_tuples_in_one_request: duplicate tuples in one request.\n - cannot_allow_duplicate_types_in_one_request: duplicate types in one request.\n - cannot_allow_multiple_references_to_one_relation: cannot use a relation to define itself.\n - invalid_continuation_token: invalid continuation token.\n - invalid_tuple_set: invalid tuple set.\n - invalid_check_input: invalid check input.\n - invalid_expand_input: invalid expand input.\n - unsupported_user_set: unsupported user set.\n - invalid_object_format: invalid object format.\n - token_issuer_already_registered: token issuers already registered.\n - write_failed_due_to_invalid_input: write request failed due to invalid input.\n - authorization_model_assertions_not_found: no assertions found for authorization model.\n - latest_authorization_model_not_found: latest authorization model not found.\n - type_not_found: type not found.\n - relation_not_found: relation not found.\n - empty_relation_definition: empty relation definition.\n - invalid_user: invalid user.\n - invalid_token_issuer: invalid token issuer.\n - invalid_tuple: invalid tuple.\n - unknown_relation: unknown relation.\n - store_id_invalid_length: store id has invalid length.\n - issuer_url_invalid_uri: issuer url has invalid URI.\n - issuer_url_required_absolute_path: issuer url is not absolute path.\n - assertions_too_many_items: assertions have too many items.\n - id_too_long: ID is too long.\n - invalid_environment: invalid environment is specified.\n - authorization_model_id_too_long: authorization model id is too long.\n - tuple_key_value_not_specified: tuple key value is not specified.\n - tuple_keys_too_many_or_too_few_items: tuple keys have too few or too many items.\n - page_size_invalid: page size is outside of acceptable range.\n - param_missing_value: params value is missing.\n - difference_base_missing_value: difference's base value is missing.\n - subtract_base_missing_value: subtract base value is missing.\n - object_too_long: object length is too long.\n - relation_too_long: relation length is too long.\n - type_definitions_too_few_items: type definitions do not have enough item.\n - type_invalid_length: type length is invalid.\n - type_invalid_pattern: type does not match expected pattern.\n - relations_too_few_items: relations have too few items.\n - relations_too_long: relations' length is too long.\n - relations_invalid_pattern: relations do not match expected pattern.\n - object_invalid_pattern: object does not match expected pattern.\n - query_string_type_continuation_token_mismatch: type in the query string and the continuation token don't match.\n - invalid_contextual_tuple: Invalid contextual tuple.\n - duplicate_contextual_tuple: Duplicate contextual tuple.","enum":["no_error","validation_error","authorization_model_not_found","authorization_model_resolution_too_complex","invalid_write_input","cannot_allow_duplicate_tuples_in_one_request","cannot_allow_duplicate_types_in_one_request","cannot_allow_multiple_references_to_one_relation","invalid_continuation_token","invalid_tuple_set","invalid_check_input","invalid_expand_input","unsupported_user_set","invalid_object_format","token_issuer_already_registered","write_failed_due_to_invalid_input","authorization_model_assertions_not_found","latest_authorization_model_not_found","type_not_found","relation_not_found","empty_relation_definition","invalid_user","invalid_token_issuer","invalid_tuple","unknown_relation","store_id_invalid_length","issuer_url_invalid_uri","issuer_url_required_absolute_path","assertions_too_many_items","id_too_long","invalid_environment","authorization_model_id_too_long","tuple_key_value_not_specified","tuple_keys_too_many_or_too_few_items","page_size_invalid","param_missing_value","difference_base_missing_value","subtract_base_missing_value","object_too_long","relation_too_long","type_definitions_too_few_items","type_invalid_length","type_invalid_pattern","relations_too_few_items","relations_too_long","relations_invalid_pattern","object_invalid_pattern","query_string_type_continuation_token_mismatch","invalid_contextual_tuple","duplicate_contextual_tuple"],"title":"ErrorCodeEnums","type":"string","uniqueKey":"code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"validation_error","message":"Generic validation error"}}},"exampleType":"generated"}},"description":"Request failed due to invalid input.","exampleType":"generated"},"9db49e75-d54f-4f63-b538-3820fc182e8b":{"content":{"application/json":{"schema":{"example":{"code":"unauthorized_principal","message":"Missing permissions to perform operation"},"properties":{"code":{"default":"no_auth_error","description":"- no_auth_error: no error\n - auth_failure: generic authentication error. Details available via message field.\n - auth_failed_invalid_subject: authentication failure due to invalid subject.\n - auth_failed_invalid_audience: authentication failure due to invalid audience.\n - auth_failed_invalid_issuer: authentication failure due to invalid issuer.\n - invalid_claims: authentication failure due to invalid claims.\n - auth_failed_invalid_bearer_token: authentication failure due to invalid bearer token.\n - missing_customer_in_bearer_token: authentication failure with customer id missing in bearer token.\n - missing_store_in_bearer_token: authentication failure with store id missing in bearer token.\n - store_mismatch_in_bearer_token: authentication failure due to store mismatch from bearer token.\n - customer_mismatch_in_bearer_token: authentication failure due to customer id in the request being different from the customer id in the bearer token.\n - bearer_token_missing: bearer token missing in request.\n - unauthenticated: unauthenticated.\n - insufficient_permissions: insufficient permissions.\n - unauthorized_principal: authentication denial due to unauthorized principal.","enum":["no_auth_error","auth_failure","auth_failed_invalid_subject","auth_failed_invalid_audience","auth_failed_invalid_issuer","invalid_claims","auth_failed_invalid_bearer_token","missing_customer_in_bearer_token","missing_store_in_bearer_token","store_mismatch_in_bearer_token","customer_mismatch_in_bearer_token","bearer_token_missing","unauthenticated","insufficient_permissions","unauthorized_principal"],"title":"AuthErrorCodeEnums","type":"string","uniqueKey":"code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"unauthorized_principal","message":"Missing permissions to perform operation"}}},"exampleType":"generated"}},"description":"Request failed due to authentication errors.","exampleType":"generated"},"a8a44b9b-9819-455a-b9f9-384e6f54c7c6":{"content":{"application/json":{"schema":{"example":{"code":"unauthorized_principal","message":"Missing permissions to perform operation"},"properties":{"code":{"default":"no_auth_error","description":"- no_auth_error: no error\n - auth_failure: generic authentication error. Details available via message field.\n - auth_failed_invalid_subject: authentication failure due to invalid subject.\n - auth_failed_invalid_audience: authentication failure due to invalid audience.\n - auth_failed_invalid_issuer: authentication failure due to invalid issuer.\n - invalid_claims: authentication failure due to invalid claims.\n - auth_failed_invalid_bearer_token: authentication failure due to invalid bearer token.\n - missing_customer_in_bearer_token: authentication failure with customer id missing in bearer token.\n - missing_store_in_bearer_token: authentication failure with store id missing in bearer token.\n - store_mismatch_in_bearer_token: authentication failure due to store mismatch from bearer token.\n - customer_mismatch_in_bearer_token: authentication failure due to customer id in the request being different from the customer id in the bearer token.\n - bearer_token_missing: bearer token missing in request.\n - unauthenticated: unauthenticated.\n - insufficient_permissions: insufficient permissions.\n - unauthorized_principal: authentication denial due to unauthorized principal.","enum":["no_auth_error","auth_failure","auth_failed_invalid_subject","auth_failed_invalid_audience","auth_failed_invalid_issuer","invalid_claims","auth_failed_invalid_bearer_token","missing_customer_in_bearer_token","missing_store_in_bearer_token","store_mismatch_in_bearer_token","customer_mismatch_in_bearer_token","bearer_token_missing","unauthenticated","insufficient_permissions","unauthorized_principal"],"title":"AuthErrorCodeEnums","type":"string","uniqueKey":"code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"unauthorized_principal","message":"Missing permissions to perform operation"}}},"exampleType":"generated"}},"description":"Request failed due to forbidden permission.","exampleType":"generated"},"ec606a81-7450-4291-8e8b-2286bc9b1414":{"content":{"application/json":{"schema":{"example":{"code":"undefined_endpoint","message":"Endpoint not enabled"},"properties":{"code":{"default":"no_not_found_error","description":"- no_not_found_error: no error\n - undefined_endpoint: undefined endpoint.\n - store_id_not_found: store ID not found\n - resource_not_found: generic not found.\n - unimplemented: method is unimplemented","enum":["no_not_found_error","undefined_endpoint","store_id_not_found","resource_not_found","unimplemented"],"title":"NotFoundErrorCodeEnums","type":"string","uniqueKey":"code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"undefined_endpoint","message":"Endpoint not enabled"}}},"exampleType":"generated"}},"description":"Request failed due to incorrect path.","exampleType":"generated"},"c3717fb4-37c2-4234-b4f4-b5cc4f32175a":{"content":{"application/json":{"schema":{"example":{"code":"10","message":"transaction conflict"},"properties":{"code":{"type":"string","uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"10","message":"transaction conflict"}}},"exampleType":"generated"}},"description":"Request was aborted due a transaction conflict.","exampleType":"generated"},"e0992d00-34b7-4c75-9fa5-f2ed7e325c05":{"content":{"application/json":{"schema":{"example":{"code":"throttled_timeout_error","message":"timeout due to throttling on complex request"},"properties":{"code":{"default":"no_throttled_error_code","enum":["no_throttled_error_code","throttled_timeout_error"],"title":"- no_throttled_error_code: no error\n - throttled_timeout_error: 3500 level errors are timeout due to throttling","type":"string","uniqueKey":"code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"throttled_timeout_error","message":"timeout due to throttling on complex request"}}},"exampleType":"generated"}},"description":"Request timeout due to throttling on complex query.","exampleType":"generated"},"f9a120d7-53b0-46d6-b1d0-eda2c40df49c":{"content":{"application/json":{"schema":{"example":{"code":"rate_limit_exceeded","message":"Rate Limit exceeded"},"properties":{"code":{"default":"no_resource_exhausted_error","description":"- no_resource_exhausted_error: no error\n - rate_limit_exceeded: operation failed due to exceeding rate limit.\n - auth_rate_limit_exceeded: rate limit error during authentication.","enum":["no_resource_exhausted_error","rate_limit_exceeded","auth_rate_limit_exceeded"],"title":"ResourceExhaustedErrorCodeEnums","type":"string","uniqueKey":"code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"rate_limit_exceeded","message":"Rate Limit exceeded"}}},"exampleType":"generated"}},"description":"Request failed due to too many requests.","exampleType":"generated"},"08e3592f-03e3-4a07-ac50-d66881bb507f":{"content":{"application/json":{"schema":{"example":{"code":"internal_error","message":"Internal Server Error"},"properties":{"code":{"default":"no_internal_error","description":"- no_internal_error: no error\n - internal_error: generic internal error.\n - auth_internal_error: internal error due to authentication error.\n - auth_failed_error_fetching_well_known_jwks: authentication failure due to internal error in fetching well-known/jwks.json.\n - cancelled: internal error - request being cancelled.\n - deadline_exceeded: internal error - deadline exceeded.\n - already_exists: internal error - already exists.\n - resource_exhausted: internal error - resource exhausted.\n - failed_precondition: internal error - failed precondition.\n - aborted: internal error - aborted.\n - out_of_range: internal error - out of range.\n - unavailable: internal error - unavailable.\n - data_loss: internal error - data loss.","enum":["no_internal_error","internal_error","auth_internal_error","auth_failed_error_fetching_well_known_jwks","cancelled","deadline_exceeded","already_exists","resource_exhausted","failed_precondition","aborted","out_of_range","unavailable","data_loss"],"title":"InternalErrorCodeEnums","type":"string","uniqueKey":"code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"internal_error","message":"Internal Server Error"}}},"exampleType":"generated"}},"description":"Request failed due to internal server error.","exampleType":"generated"}},"security":{"46828139-9a33-4050-a3fa-d30ef9cbfe3a":{"ClientCredentials":{"flows":{"clientCredentials":{"scopes":{"check:tuples":"Allows checking tuples","create:stores":"Allows creation of stores","delete:stores":"Allows deletion of stores","expand:tuples":"Allows expanding tuples","list:objects":"Allows reading results of list objects","list:users":"Allows reading results of list users","read:assertions":"Allows reading assertions","read:authorization_models":"Allows reading authorization models","read:changes":"Allows reading changes","read:expansions":"Allows reading index expansions","read:stores":"Allows reading of stores","read:tuples":"Allows reading tuples","search:logs":"Allows searching store logs","write:assertions":"Allows updating assertions","write:authorization_models":"Allows writing authorization models","write:tuples":"Allows writing tuples"},"tokenUrl":"https://auth.fga.dev/oauth/token"}},"type":"oauth2","scopes":["read:authorization_models"],"schemeName":"ClientCredentials"}}},"servers":{"eff403a7-e0d5-4610-9544-067aa4b1f15c":{"url":"https://api.us1.fga.dev","description":"United States"},"42e2fc68-4200-4e8e-9714-aba1d79d2b3f":{"url":"https://api.eu1.fga.dev","description":"Europe"},"e1646084-8df8-43f3-b219-009e387ee8fe":{"url":"https://api.au1.fga.dev","description":"Australia"}},"schemas":{"64a79d3c-cfda-4837-ac34-2c9934f69584":{"properties":{"computedUserset":{"properties":{"object":{"type":"string"},"relation":{"type":"string"}},"type":"object"},"difference":{"properties":{"base":{"oneOf":[{"isRequired":true}],"isRequired":true},"subtract":{"oneOf":[{"isRequired":true}],"isRequired":true}},"required":["base","subtract"],"type":"object"},"intersection":{"properties":{"child":{"items":{"$circularRef":"64a79d3c-cfda-4837-ac34-2c9934f69584"},"type":"array","isRequired":true}},"required":["child"],"type":"object"},"this":{"description":"A DirectUserset is a sentinel message for referencing\nthe direct members specified by an object/relation mapping.","type":"object"},"tupleToUserset":{"properties":{"computedUserset":{"properties":{"object":{"type":"string"},"relation":{"type":"string"}},"type":"object","isRequired":true},"tupleset":{"type":"object","title":"The target object/relation","properties":{"object":{"type":"string"},"relation":{"type":"string"}},"isRequired":true}},"required":["tupleset","computedUserset"],"type":"object"},"union":{"properties":{"child":{"items":{"$circularRef":"64a79d3c-cfda-4837-ac34-2c9934f69584"},"type":"array","isRequired":true}},"required":["child"],"type":"object"}},"type":"object"},"229b9f9a-3b17-446b-82ad-f08c9ce58769":{"properties":{"type_name":{"default":"TYPE_NAME_UNSPECIFIED","enum":["TYPE_NAME_UNSPECIFIED","TYPE_NAME_ANY","TYPE_NAME_BOOL","TYPE_NAME_STRING","TYPE_NAME_INT","TYPE_NAME_UINT","TYPE_NAME_DOUBLE","TYPE_NAME_DURATION","TYPE_NAME_TIMESTAMP","TYPE_NAME_MAP","TYPE_NAME_LIST","TYPE_NAME_IPADDRESS"],"type":"string","isRequired":true},"generic_types":{"items":{"$circularRef":"229b9f9a-3b17-446b-82ad-f08c9ce58769"},"type":"array"}},"required":["type_name"],"type":"object"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"flows":{"clientCredentials":{"scopes":{"check:tuples":"Allows checking tuples","create:stores":"Allows creation of stores","delete:stores":"Allows deletion of stores","expand:tuples":"Allows expanding tuples","list:objects":"Allows reading results of list objects","list:users":"Allows reading results of list users","read:assertions":"Allows reading assertions","read:authorization_models":"Allows reading authorization models","read:changes":"Allows reading changes","read:expansions":"Allows reading index expansions","read:stores":"Allows reading of stores","read:tuples":"Allows reading tuples","search:logs":"Allows searching store logs","write:assertions":"Allows updating assertions","write:authorization_models":"Allows writing authorization models","write:tuples":"Allows writing tuples"},"tokenUrl":"https://auth.fga.dev/oauth/token"}},"type":"oauth2","scopes":["read:authorization_models"],"schemeName":"ClientCredentials"},"schema":{"title":"OAuth2 Auth","type":"string","isRequired":true,"description":"The access token received from the authorization server in the OAuth 2.0 flow.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"ClientCredentials","name":"Authorization"}],"title":"ClientCredentials"}]},"originalFileLocation":"https://api.us1.fga.dev/docs/openapi.json"},"subdomain":"auth0-fga","siteName":"Auth0 FGA Docs","title":"Get an authorization model by its ID - Auth0 FGA Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-30T10:36:00.376Z","originalFileLocation":"api/service/authorization-models/read-authorization-model.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"The ReadAuthorizationModel API returns an authorization model by its identifier. The response returns the authorization model for the particular ID. Authorization models in Auth0 FGA are immutable. You can create new versions, but you cannot delete or modify existing ones. ## Example To retrieve the authorization model with ID 01G5JAVJ41T49E9TT3SKVS7X1J for the store, call the GET authorization-models by ID API with 01G5JAVJ41T49E9TT3SKVS7X1J as the id path parameter. The API returns: json { \u0026quot;authorization_model\u0026quot;:{ \u0026quot;id\u0026quot;:\u0026quot;01G5JAVJ41T49E9TT3SKVS7X1J\u0026quot;, \u0026quot;type_definitions\u0026quot;:[ { \u0026quot;type\u0026quot;:\u0026quot;user\u0026quot; }, { \u0026quot;type\u0026quot;:\u0026quot;document\u0026quot;, \u0026quot;relations\u0026quot;:{ \u0026quot;reader\u0026quot;:{ \u0026quot;union\u0026quot;:{ \u0026quot;child\u0026quot;:[ { \u0026quot;this\u0026quot;:{} }, { \u0026quot;computedUserset\u0026quot;:{ \u0026quot;object\u0026quot;:\u0026quot;\u0026quot;, \u0026quot;relation\u0026quot;:\u0026quot;writer\u0026quot; } } ] } }, \u0026quot;writer\u0026quot;:{ \u0026quot;this\u0026quot;:{} } } } ] } } In the above example, there are 2 types (user and document). The document type has 2 relations (writer and reader).\">\u003cmeta data-mint-head name=\"application-name\" content=\"Auth0 FGA Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/auth0-fga/images/favicons/auth0-favicon-onlight.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/auth0-fga/images/favicons/auth0-favicon-onlight.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/auth0-fga/images/favicons/auth0-favicon-onlight.png\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/png\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/auth0-fga/images/favicons/auth0-favicon-onlight.png\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get an authorization model by its ID - Auth0 FGA Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"The ReadAuthorizationModel API returns an authorization model by its identifier. The response returns the authorization model for the particular ID. Authorization models in Auth0 FGA are immutable. You can create new versions, but you cannot delete or modify existing ones. ## Example To retrieve the authorization model with ID 01G5JAVJ41T49E9TT3SKVS7X1J for the store, call the GET authorization-models by ID API with 01G5JAVJ41T49E9TT3SKVS7X1J as the id path parameter. The API returns: json { \u0026quot;authorization_model\u0026quot;:{ \u0026quot;id\u0026quot;:\u0026quot;01G5JAVJ41T49E9TT3SKVS7X1J\u0026quot;, \u0026quot;type_definitions\u0026quot;:[ { \u0026quot;type\u0026quot;:\u0026quot;user\u0026quot; }, { \u0026quot;type\u0026quot;:\u0026quot;document\u0026quot;, \u0026quot;relations\u0026quot;:{ \u0026quot;reader\u0026quot;:{ \u0026quot;union\u0026quot;:{ \u0026quot;child\u0026quot;:[ { \u0026quot;this\u0026quot;:{} }, { \u0026quot;computedUserset\u0026quot;:{ \u0026quot;object\u0026quot;:\u0026quot;\u0026quot;, \u0026quot;relation\u0026quot;:\u0026quot;writer\u0026quot; } } ] } }, \u0026quot;writer\u0026quot;:{ \u0026quot;this\u0026quot;:{} } } } ] } } In the above example, there are 2 types (user and document). The document type has 2 relations (writer and reader).\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Auth0 FGA Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.fga.dev/api/service/authorization-models/read-authorization-model\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs.fga.dev/img/og-auth0-fga.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Get an authorization model by its ID - Auth0 FGA Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"The ReadAuthorizationModel API returns an authorization model by its identifier. The response returns the authorization model for the particular ID. Authorization models in Auth0 FGA are immutable. You can create new versions, but you cannot delete or modify existing ones. ## Example To retrieve the authorization model with ID 01G5JAVJ41T49E9TT3SKVS7X1J for the store, call the GET authorization-models by ID API with 01G5JAVJ41T49E9TT3SKVS7X1J as the id path parameter. The API returns: json { \u0026quot;authorization_model\u0026quot;:{ \u0026quot;id\u0026quot;:\u0026quot;01G5JAVJ41T49E9TT3SKVS7X1J\u0026quot;, \u0026quot;type_definitions\u0026quot;:[ { \u0026quot;type\u0026quot;:\u0026quot;user\u0026quot; }, { \u0026quot;type\u0026quot;:\u0026quot;document\u0026quot;, \u0026quot;relations\u0026quot;:{ \u0026quot;reader\u0026quot;:{ \u0026quot;union\u0026quot;:{ \u0026quot;child\u0026quot;:[ { \u0026quot;this\u0026quot;:{} }, { \u0026quot;computedUserset\u0026quot;:{ \u0026quot;object\u0026quot;:\u0026quot;\u0026quot;, \u0026quot;relation\u0026quot;:\u0026quot;writer\u0026quot; } } ] } }, \u0026quot;writer\u0026quot;:{ \u0026quot;this\u0026quot;:{} } } } ] } } In the above example, there are 2 types (user and document). The document type has 2 relations (writer and reader).\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs.fga.dev/img/og-auth0-fga.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/auth0-fga/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Auth0 FGA Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9921FE\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.fga.dev/api/service/authorization-models/read-authorization-model\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api/service/authorization-models/read-authorization-model.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.fga.dev/#organization\",\"name\":\"Auth0 FGA Docs\",\"url\":\"https://docs.fga.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintlify.s3.us-west-1.amazonaws.com/auth0-fga/images/brand/auth0-fga-lockup-en-onlight.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.fga.dev#website\",\"name\":\"Auth0 FGA Docs\",\"url\":\"https://docs.fga.dev\",\"publisher\":{\"@id\":\"https://docs.fga.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.fga.dev/api/service/authorization-models/read-authorization-model#webpage\",\"url\":\"https://docs.fga.dev/api/service/authorization-models/read-authorization-model\",\"name\":\"Get an authorization model by its ID\",\"description\":\"The ReadAuthorizationModel API returns an authorization model by its identifier. The response returns the authorization model for the particular ID. Authorization models in Auth0 FGA are immutable. You can create new versions, but you cannot delete or modify existing ones. ## Example To retrieve the authorization model with ID 01G5JAVJ41T49E9TT3SKVS7X1J for the store, call the GET authorization-models by ID API with 01G5JAVJ41T49E9TT3SKVS7X1J as the id path parameter. The API returns: json { \\\"authorization_model\\\":{ \\\"id\\\":\\\"01G5JAVJ41T49E9TT3SKVS7X1J\\\", \\\"type_definitions\\\":[ { \\\"type\\\":\\\"user\\\" }, { \\\"type\\\":\\\"document\\\", \\\"relations\\\":{ \\\"reader\\\":{ \\\"union\\\":{ \\\"child\\\":[ { \\\"this\\\":{} }, { \\\"computedUserset\\\":{ \\\"object\\\":\\\"\\\", \\\"relation\\\":\\\"writer\\\" } } ] } }, \\\"writer\\\":{ \\\"this\\\":{} } } } ] } } In the above example, there are 2 types (user and document). The document type has 2 relations (writer and reader).\",\"dateModified\":\"2026-10-30T10:36:00.376Z\",\"isPartOf\":{\"@id\":\"https://docs.fga.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.fga.dev/api/service/authorization-models/read-authorization-model#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.fga.dev/api/service/authorization-models/read-authorization-model#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Authorization Models\",\"item\":\"https://docs.fga.dev/api/service/authorization-models/read-authorization-models\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get an authorization model by its ID\",\"item\":\"https://docs.fga.dev/api/service/authorization-models/read-authorization-model\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.fga.dev/api/service/authorization-models/read-authorization-model#apireference\",\"headline\":\"Get an authorization model by its ID\",\"name\":\"Get an authorization model by its ID\",\"description\":\"The ReadAuthorizationModel API returns an authorization model by its identifier. The response returns the authorization model for the particular ID. Authorization models in Auth0 FGA are immutable. You can create new versions, but you cannot delete or modify existing ones. ## Example To retrieve the authorization model with ID 01G5JAVJ41T49E9TT3SKVS7X1J for the store, call the GET authorization-models by ID API with 01G5JAVJ41T49E9TT3SKVS7X1J as the id path parameter. The API returns: json { \\\"authorization_model\\\":{ \\\"id\\\":\\\"01G5JAVJ41T49E9TT3SKVS7X1J\\\", \\\"type_definitions\\\":[ { \\\"type\\\":\\\"user\\\" }, { \\\"type\\\":\\\"document\\\", \\\"relations\\\":{ \\\"reader\\\":{ \\\"union\\\":{ \\\"child\\\":[ { \\\"this\\\":{} }, { \\\"computedUserset\\\":{ \\\"object\\\":\\\"\\\", \\\"relation\\\":\\\"writer\\\" } } ] } }, \\\"writer\\\":{ \\\"this\\\":{} } } } ] } } In the above example, there are 2 types (user and document). The document type has 2 relations (writer and reader).\",\"url\":\"https://docs.fga.dev/api/service/authorization-models/read-authorization-model\",\"mainEntityOfPage\":{\"@id\":\"https://docs.fga.dev/api/service/authorization-models/read-authorization-model#webpage\"},\"image\":\"https://docs.fga.dev/img/og-auth0-fga.png\",\"dateModified\":\"2026-10-30T10:36:00.376Z\",\"publisher\":{\"@id\":\"https://docs.fga.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.fga.dev#website\"}}]}\u003c/script>","siteName":"Auth0 FGA Docs","nav":{"global":null,"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":""}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"Auth0 FGA API Reference","href":"/api/service"}]},{"group":"Assertions","pages":[{"title":"Get assertions for a model","deprecated":null,"version":null,"sidebarTitle":"Read assertions","openapi":"https://api.us1.fga.dev/docs/openapi.json get /stores/{store_id}/assertions/{authorization_model_id}","href":"/api/service/assertions/read-assertions"},{"title":"Upsert assertions for a model","deprecated":null,"version":null,"sidebarTitle":"Write assertions","openapi":"https://api.us1.fga.dev/docs/openapi.json put /stores/{store_id}/assertions/{authorization_model_id}","href":"/api/service/assertions/write-assertions"}]},{"group":"Authorization Models","pages":[{"title":"Get all authorization models","deprecated":null,"version":null,"sidebarTitle":"Read authorization models","openapi":"https://api.us1.fga.dev/docs/openapi.json get /stores/{store_id}/authorization-models","href":"/api/service/authorization-models/read-authorization-models"},{"title":"Create a new authorization model","description":"The WriteAuthorizationModel API adds a new authorization model to a store.\nEach item in the `type_definitions` array is a type definition as specified in the field `type_definition`.\nThe response returns the authorization model's ID in the `authorization_model_id` field.\n\n## Example\n\nTo add an authorization model with `user` and `document` type definitions, call the `POST` `authorization-models` API with the body:\n```json\n{\n \"type_definitions\":[\n {\n \"type\":\"user\"\n },\n {\n \"type\":\"document\",\n \"relations\":{\n \"reader\":{\n \"union\":{\n \"child\":[\n {\n \"this\":{}\n },\n {\n \"computedUserset\":{\n \"object\":\"\",\n \"relation\":\"writer\"\n }\n }\n ]\n }\n },\n \"writer\":{\n \"this\":{}\n }\n }\n }\n ]\n}\n```\nAuth0 FGA's response includes the version ID for this authorization model, similar to:\n```json\n{\"authorization_model_id\": \"01G50QVV17PECNVAHX1GG4Y5NC\"}\n```\n","deprecated":null,"version":null,"sidebarTitle":"Write authorization model","openapi":"https://api.us1.fga.dev/docs/openapi.json post /stores/{store_id}/authorization-models","href":"/api/service/authorization-models/write-authorization-model"},{"title":"Get an authorization model by its ID","deprecated":null,"version":null,"sidebarTitle":"Read authorization model","openapi":"https://api.us1.fga.dev/docs/openapi.json get /stores/{store_id}/authorization-models/{id}","href":"/api/service/authorization-models/read-authorization-model"}]},{"group":"Relationship Queries","pages":[{"title":"Check multiple authorizations in a single request","description":"The `BatchCheck` API functions nearly identically to `Check`, but instead of checking a single user-object relationship BatchCheck accepts a list of relationships to check and returns a map containing `BatchCheckItem` response for each check it received.\n\nAn associated `correlation_id` is required for each check in the batch. This ID is used to correlate a check to the appropriate response. It is a string consisting of only alphanumeric characters or hyphens with a maximum length of 36 characters. This `correlation_id` is used to map the result of each check to the item which was checked, so it must be unique for each item in the batch. We recommend using a UUID or ULID as the `correlation_id`, but you can use whatever unique identifier you need as long as it matches this regex pattern: `^[\\w\\d-]{1,36}$`\n\n> **Note:** The maximum number of checks that can be passed in a single `BatchCheck` request is 50. If `BatchCheck` is called using the SDK, the SDK can split the batch check requests for you.\n\nFor more details on how `Check` functions, review the [Check](https://docs.fga.dev/api/service/relationship-queries/check) docs.\n\n### Examples\n\n#### A BatchCheckRequest\n\n```json\n{\n \"checks\": [\n {\n \"tuple_key\": {\n \"object\": \"document:2021-budget\"\n \"relation\": \"reader\",\n \"user\": \"user:anne\",\n },\n \"contextual_tuples\": {...}\n \"context\": {}\n \"correlation_id\": \"01JA8PM3QM7VBPGB8KMPK8SBD5\"\n },\n {\n \"tuple_key\": {\n \"object\": \"document:2021-budget\"\n \"relation\": \"reader\",\n \"user\": \"user:bob\",\n },\n \"contextual_tuples\": {...}\n \"context\": {}\n \"correlation_id\": \"01JA8PMM6A90NV5ET0F28CYSZQ\"\n }\n ]\n}\n```\n\nBelow is a possible response to the above request. Note that the result map's keys are the `correlation_id` values from the checked items in the request:\n```json\n{\n \"result\": {\n \"01JA8PMM6A90NV5ET0F28CYSZQ\": {\n \"allowed\": false, \n \"error\": {\"message\": \"\"} \n },\n \"01JA8PM3QM7VBPGB8KMPK8SBD5\": {\n \"allowed\": true, \n \"error\": {\"message\": \"\"} \n }\n}\n```\n","deprecated":null,"version":null,"sidebarTitle":"Batch check","openapi":"https://api.us1.fga.dev/docs/openapi.json post /stores/{store_id}/batch-check","href":"/api/service/relationship-queries/batch-check"},{"title":"Check user authorization","deprecated":null,"version":null,"sidebarTitle":"Check","openapi":"https://api.us1.fga.dev/docs/openapi.json post /stores/{store_id}/check","href":"/api/service/relationship-queries/check"},{"title":"Expand relationships in userset tree format","deprecated":null,"version":null,"sidebarTitle":"Expand","openapi":"https://api.us1.fga.dev/docs/openapi.json post /stores/{store_id}/expand","href":"/api/service/relationship-queries/expand"},{"title":"List objects a user is related to","deprecated":null,"version":null,"sidebarTitle":"List objects","openapi":"https://api.us1.fga.dev/docs/openapi.json post /stores/{store_id}/list-objects","href":"/api/service/relationship-queries/list-objects"},{"title":"List users related to an object","deprecated":null,"version":null,"sidebarTitle":"List users","openapi":"https://api.us1.fga.dev/docs/openapi.json post /stores/{store_id}/list-users","href":"/api/service/relationship-queries/list-users"},{"title":"[EXPERIMENTAL] Stream objects a user is related to","deprecated":null,"version":null,"sidebarTitle":"Streamed list objects","openapi":"https://api.us1.fga.dev/docs/openapi.json post /stores/{store_id}/streamed-list-objects","href":"/api/service/relationship-queries/streamed-list-objects"}]},{"group":"Relationship Tuples","pages":[{"title":"Get all tuple changes","deprecated":null,"version":null,"sidebarTitle":"Read changes","openapi":"https://api.us1.fga.dev/docs/openapi.json get /stores/{store_id}/changes","href":"/api/service/relationship-tuples/read-changes"},{"title":"Get stored relationship tuples","deprecated":null,"version":null,"sidebarTitle":"Read","openapi":"https://api.us1.fga.dev/docs/openapi.json post /stores/{store_id}/read","href":"/api/service/relationship-tuples/read"},{"title":"Add or delete tuples","deprecated":null,"version":null,"sidebarTitle":"Write","openapi":"https://api.us1.fga.dev/docs/openapi.json post /stores/{store_id}/write","href":"/api/service/relationship-tuples/write"}]},{"group":"Permissions Index","pages":[{"title":"Stream expansion events from a permissions index","deprecated":null,"version":null,"sidebarTitle":"Read expansions","openapi":"https://api.us1.fga.dev/docs/openapi.json get /stores/{store_id}/indexes/{index_id}/expansions","href":"/api/service/permissions-index/read-expansions"}]},{"group":"Logs","pages":[{"title":"Search logs for a store.","deprecated":null,"version":null,"sidebarTitle":"Search store logs","openapi":"https://api.us1.fga.dev/docs/openapi.json get /stores/{store_id}/logs","href":"/api/service/logs/search-store-logs"}]}]}]},"basePath":"","title":"Get an authorization model by its ID - Auth0 FGA Docs","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C-hEh3I2.js","utils-CnF4QiUD.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C7PVNbel.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-8ytevL2A.js","snippetPresets-BT1alx3v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BLXC0i_W.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CyLIGI9_.js","shallow-DC0lGVIW.js","getApiPlaygroundDisplay-CgDQ85tN.js","CodeSnippet-6-I-Gpv9.js","CodeSnippets-BAk1kDdu.js","Page-C945cI-W.js","getPastedJson-B276RuWN.js","icon-BqP8etTm.js","MethodPill-DM6sbxG1.js","DuplicateIcon-PyJglOaE.js","createIcon-CMeOMAc_.js","DynamicMarkdown-BoyYAA8K.js","SectionHeading-DAYv3gvZ.js","axios-vUo_bRtp.js","Markdown-BhTTmazV.js","clsx-CR-RHrVC.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CBUH0-zX.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BmARFYNC.js"]}