1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b09f7ea3-4a8f-4b01-8133-5dd84bfb9599",e._sentryDebugIdIdentifier="sentry-dbid-b09f7ea3-4a8f-4b01-8133-5dd84bfb9599")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"4fdb87eed04ecf49489ec6db9b15acde2c687d66"};(self.webpackChunkdocumentation_ably_realtime=self.webpackChunkdocumentation_ably_realtime||[]).push([[472],{15628:function(e,t,n){n.r(t),n.d(t,{default:function(){return N}});var a=n(99694),l=n(30758);function i(e){const t=Object.assign({p:"p",code:"code",h2:"h2",a:"a",span:"span",h3:"h3",ul:"ul",li:"li",h4:"h4",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td",pre:"pre"},(0,a.RP)(),e.components),{Aside:n,Code:i}=t;return n||c("Aside",!0),i||c("Code",!0),l.createElement(l.Fragment,null,l.createElement(t.p,null,"When a client is authenticated and connected to Ably, it is considered to be an authenticated client. While an authenticated client has a means to authenticate with Ably, they do not necessarily have an identity."),"\n",l.createElement(t.p,null,"When a client is assigned a trusted identity, that is, a ",l.createElement(t.code,null,"clientId"),", then they are considered to be an identified client. For all operations that client performs with the Ably service, their ",l.createElement(t.code,null,"clientId")," field will be automatically populated and can be trusted by other clients."),"\n",l.createElement(t.p,null,"For example, assume you are building a chat application and want to allow clients to publish messages and be present on a channel. If each client is assigned a trusted identity by your server, such as a unique email address or UUID, then all other subscribed clients can trust any messages or presence events they receive in the channel as being from that client. No other clients are permitted to assume a ",l.createElement(t.code,null,"clientId")," that they are not assigned in their Ably-compatible token. They are unable to masquerade as another ",l.createElement(t.code,null,"clientId"),"."),"\n",l.createElement(t.h2,{id:"clientid-immutability-",style:{position:"relative"}},"ClientId immutability ",l.createElement("a",{id:"immutability"}),l.createElement(t.a,{href:"#clientid-immutability-","aria-label":"clientid immutability permalink",className:"gatsby-copyable-header after"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}}))),"\n",l.createElement(t.p,null,"A connection's ",l.createElement(t.code,null,"clientId"),", once set, is immutable. You cannot change a ",l.createElement(t.code,null,"clientId")," after it has been established for a connection."),"\n",l.createElement(t.h3,{id:"late-initialization",style:{position:"relative"}},"Late initialization",l.createElement(t.a,{href:"#late-initialization","aria-label":"late initialization permalink",className:"gatsby-copyable-header after"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}}))),"\n",l.createElement(t.p,null,"It is possible to have late initialization of ",l.createElement(t.code,null,"clientId")," in certain scenarios:"),"\n",l.createElement(t.ul,null,"\n",l.createElement(t.li,null,"AuthCallback discovery: When using ",l.createElement(t.code,null,"authCallback"),", the ",l.createElement(t.code,null,"clientId")," may only become known when the first authCallback completes and returns a token with a ",l.createElement(t.code,null,"clientId"),"."),"\n",l.createElement(t.li,null,"Opaque token processing: When the library receives an opaque token string, it only learns the ",l.createElement(t.code,null,"clientId")," when it receives a response from the server that has processed the token."),"\n"),"\n",l.createElement(t.p,null,"In both cases, the immutability requirement is satisfied because the ",l.createElement(t.code,null,"clientId")," gets set as part of the client's first interaction with the server. Once this initial authentication is complete, the ",l.createElement(t.code,null,"clientId")," cannot be changed for that connection."),"\n",l.createElement(t.h2,{id:"assign-a-clientid-",style:{position:"relative"}}
1,"Assign a clientId ",l.createElement("a",{id:"assign"}),l.createElement(t.a,{href:"#assign-a-clientid-","aria-label":"assign a clientid permalink",className:"gatsby-copyable-header after"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}}))),"\n",l.createElement(t.p,null,"There are three different ways a client can be identified with using a ",l.createElement(t.code,null,"clientId"),":"),"\n",l.createElement(t.ul,null,"\n",l.createElement(t.li,null,"A client claims a ",l.createElement(t.code,null,"clientId")," when authenticating with an API key."),"\n",l.createElement(t.li,null,"A client is authenticating with a token issued for a specific ",l.createElement(t.code,null,"clientId"),"."),"\n",l.createElement(t.li,null,"A client claims a ",l.createElement(t.code,null,"clientId")," when authenticating with a token that is issued for a wildcard ",l.createElement(t.code,null,"clientId"),"."),"\n"),"\n",l.createElement(t.p,null,"When a client sets their own ID there is the possibility that they can pretend to be someone else. To prevent this, it is recommended that you embed a ",l.createElement(t.code,null,"clientId")," in the token issued to your clients from your auth server. This ensures that the ",l.createElement(t.code,null,"clientId")," is set by your auth server, and eliminates the chance of a client pretending to be someone else."),"\n",l.createElement(n,{"data-type":"note"}
1,l.createElement(t.p,null,"Identifying a client varies depending on whether they are authenticating with basic authentication or token authentication. Token authentication is ",l.createElement(t.a,{href:"https:/docs.ably.com/docs/auth#selecting-auth"},"recommended")," in most instances so that clients authenticate using short-lived tokens and do not have access to API keys."),l.createElement(t.p,null,"Since you then control the ",l.createElement(t.code,null,"clientId"),", all other clients can rely on the validity of the ",l.createElement(t.code,null,"clientId")," in published messages and of members present in presence channels. This eliminates the possibility of a client pretending to be someone else, as they cannot claim a ",l.createElement(t.code,null,"clientId")," in their own.")),"\n",l.createElement(t.h3,{id:"basic-auth-",style:{position:"relative"}},"Basic auth ",l.createElement("a",{id:"basic"}),l.createElement(t.a,{href:"#basic-auth-","aria-label":"basic auth permalink",className:"gatsby-copyable-header after"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}}))),"\n",l.createElement(t.p,null,"You can use ",l.createElement(t.a,{href:"https:/docs.ably.com/docs/auth/basic"},"basic authentication")," to allow a client to claim any ",l.createElement(t.code,null,"clientId")," when they authenticate with Ably. As the assignation of the ",l.createElement(t.code,null,"clientId")," is not handled by a server, it cannot be trusted to represent the genuine identity of the client."),"\n",l.createElement(t.h3,{id:"token-auth-",style:{position:"relative"}},"Token auth ",l.createElement("a",{id:"token"}),l.createElement(t.a,{href:"#token-auth-","aria-label":"token auth permalink",className:"gatsby-copyable-header after"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}}))),"\n",l.createElement(t.p,null,"You can use ",l.createElement(t.a,{href:"https:/docs.ably.com/docs/auth/token"},"token authentication")," to set an explicit ",l.createElement(t.code,null,"clientId")," when creating or issuing a token. Clients using that token are restricted to operations for only that ",l.createElement(t.code,null,"clientId"),", and all operations will implicitly contain that ",l.createElement(t.code,null,"clientId"),"."),"\n",l.createElement(t.p,null,"For example, when publishing a message, the ",l.createElement(t.code,null,"clientId")," attribute of the message will be pre-populated with that ",l.createElement(t.code,null,"clientId"),". Entering presence will also implicitly use that ",l.createElement(t.code,null,"clientId"),"."),"\n",l.createElement(t.h4,null,"Using JWT ",l.createElement("a",{id:"jwt-clientid"})),"\n",l.createElement(t.p,null,"To set a ",l.createElement(t.code,null,"clientId")," in a JWT, include the ",l.createElement(t.code,null,"x-ably-clientId")," claim in the JWT payload:"),"\n",l.createElement(t.table,null,l.createElement(t.thead,null,l.createElement(t.tr,null,l.createElement(t.th,null,"Claim"),l.createElement(t.th,null,"Value"))),l.createElement(t.tbody,null,l.createElement(t.tr,null,l.createElement(t.td,null,l.createElement(t.code,null,"x-ably-clientId")),l.createElement(t.td,null,"The ",l.createElement(t.code,null,"clientId")," to assign to the client (for example, ",l.createElement(t.code,null,"user-123"),").")))
1),"\n",l.createElement(t.p,null,"See ",l.createElement(t.a,{href:"https:/docs.ably.com/docs/auth/token/jwt#scenario-standard"},"JWT authentication")," for complete server and client examples in all supported languages."),"\n",l.createElement(t.h4,null,"Using TokenRequest ",l.createElement("a",{id:"tokenrequest-clientid"})),"\n",l.createElement(t.p,null,"To set a ",l.createElement(t.code,null,"clientId")," in a TokenRequest, pass it as a parameter:"),"\n",l.createElement(i,null,l.createElement(t.pre,null,l.createElement(t.code,{className:"language-javascript"},"// Server-side with Ably SDK\nconst ably = new Ably.Rest(process.env.ABLY_API_KEY);\nconst tokenRequest = await ably.auth.createTokenRequest({ clientId: 'user-123' });\n// Return tokenRequest to client\n")),l.createElement(t.pre,null,l.createElement(t.code,{className:"language-python"},"# Server-side with Ably SDK\nably = AblyRest(os.environ['ABLY_API_KEY'])\ntoken_request = await ably.auth.create_token_request({'client_id': 'user-123'})\n# Return token_request to client\n")),l.createElement(t.pre,null,l.createElement(t.code,{className:"language-java"},'// Server-side with Ably SDK\nClientOptions options = new ClientOptions("{{API_KEY}}");\nAblyRest rest = new AblyRest(options);\n\nAuth.TokenParams tokenParams = new Auth.TokenParams();\ntokenParams.clientId = "user-123";\n\nAuth.TokenRequest tokenRequest = rest.auth.createTokenRequest(tokenParams, null);\n// Return tokenRequest to client\n')),l.createElement(t.pre,null,l.createElement(t.code,{className:"language-php"},"// Server-side with Ably SDK\n$rest = new Ably\\AblyRest(\n ['key' => '{{API_KEY}}']\n);\n\n$tokenRequest = $rest->auth->createTokenRequest(\n ['clientId' => 'user-123']\n);\n// Return $tokenRequest to client\n")),l.createElement(t.pre,null,l.createElement(t.code,{className:"language-go"},'// Server-side with Ably SDK\nrest, err := ably.NewREST(\n ably.WithKey("{{API_KEY}}"))\nif err != nil {\n log.Fatalf("Error creating Ably client: %v", err)\n}\n\ntokenParams := &ably.TokenParams{ClientID: "user-123"}\ntokenRequest, _ := rest.Auth.CreateTokenRequest(tokenParams)\n// Return tokenRequest to client\n')),l.createElement(t.pre,null,l.createElement(t.code,{className:"language-flutter"},"// Server-side with Ably SDK\nfinal clientOptions = ably.ClientOptions(\n key: '{{API_KEY}}',\n);\nfinal rest = ably.Rest(options: clientOptions);\nfinal tokenRequest = rest.auth.createTokenRequest(\n tokenParams: ably.TokenParams(clientId: 'user-123'),\n);\n// Return tokenRequest to client\n"))),"\n",l.createElement(t.h3,{id:"wildcard-token-auth-",style:{position:"relative"}},"Wildcard token auth ",l.createElement("a",{id:"wildcard"}),l.createElement(t.a,{href:"#wildcard-token-auth-","aria-label":"wildcard token auth permalink",className:"gatsby-copyable-header after"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}}))),"\n",l.createElement(t.p,null,"You can use ",l.createElement(t.a,{href:"https:/docs.ably.com/docs/auth/token"},"token authentication")," to set a wildcard ",l.createElement(t.code,null,"clientId")," using a value of ",l.createElement(t.code,null,"*")," when creating a token. Clients are then able to assume any identity in their operations, such as when publishing a message or entering presence."),"\n",l.createElement(t.h2,{id:"unidentified-clients-",style:{position:"relative"}},"Unidentified clients ",l.createElement("a",{id:"unidentified"}),l.createElement(t.a,{href:"#unidentified-clients-","aria-label":"unidentified clients permalink",className:"gatsby-copyable-header after"},l.createElement(t.span,{dangerouslySetInnerHTML:{__html:'<svg aria-hidden="true" height="20" version="1.1" viewBox="0 0 16 16" width="20"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>'}}))),"\n",l.createElement(t.p,null,"If no ",l.createElement(t.code,null,"clientId")," is provided when using ",l.createElement(t.a,{href:"https:/docs.ably.com/docs/auth/token"},"token authentication")," then clients are not permitted to assume an identity and will be considered an unidentified client in all operations. Messages published will contain no ",l.createElement(t.code,null,"clientId")," and those clients will not be permitted to enter the ",l.createElement(t.a,{href:"https:/docs.ably.com/docs/presence-occupancy/presence"},"presence")," set."))}
1var r=function(e={}){const{wrapper:t}=Object.assign({},(0,a.RP)(),e.components);return t?l.createElement(t,e,l.createElement(i,e)):i(e)};function c(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}var s=n(62056),o=n(49440),d=n(48734),u=n(70760),h=n(4591),m=n(97453),p=n(62136),g=n(66979),y=n(46149),b=n(84506),E=n(12320),f=n(41785),v=n(88540),k=n(60934),w=n(59150),I=n(80446),x=n(10111),S=n(95333),A=n(10902),T=n(68093),_=n(37281),R=n(63388),C=n(89971),j=n(86070);const H=(0,l.createContext)(void 0),q=({activePage:e,apiKeys:t,children:n,...a})=>{const{sdk:i,setSdk:r}=(()=>{const e=(0,l.useContext)(H);if(!e)throw new Error("useSDK must be used within an SDKProvider");return e})(),c=(0,l.useMemo)(()=>[{term:"RANDOM_CHANNEL_NAME",replacer:h.w}],[]),m=(0,l.useMemo)(()=>{const e=t=>{if("string"==typeof t)return(e=>{let t=e;return c.forEach(({term:e,replacer:n})=>{const a=new RegExp(`{{${e}}}`,"g");t=t.replace(a,n())}),t})(t);if(Array.isArray(t))return t.map(e);if((0,l.isValidElement)(t)){const n=t;return(0,l.cloneElement)(n,n.props,e(n.props.children))}return t};return e(n)},[n,c]),{languageOverride:p,detectedSdkType:g}=(0,l.useMemo)(()=>{const t=e=>{const n=[];return l.Children.forEach(e,e=>{if(!(0,l.isValidElement)(e))return;const a=e.props||{},i=(e=>{if(!e)return null;const t=e.match(/language-(\S+)/);return t?t[1]:null})(a.className);i&&n.push(i),a.children&&n.push.apply(n,(0,s.A)(t(a.children)))}),n},n=t(m),a=n.some(e=>e.startsWith("client_")),i=n.some(e=>e.startsWith("agent_"));return a&&e.isDualLanguage?{languageOverride:e.clientLanguage,detectedSdkType:"client"}:i&&e.isDualLanguage?{languageOverride:e.agentLanguage,detectedSdkType:"agent"}:1===n.length&&["html","xml","css","sql","json","shell","text"].includes(n[0])?{languageOverride:n[0],detectedSdkType:void 0}:{languageOverride:void 0,detectedSdkType:void 0}},[m,e.isDualLanguage,e.clientLanguage,e.agentLanguage]),y="client"===g?"Client":"agent"===g?"Agent":null;return(0,j.jsxs)("div",{className:y?"relative":void 0,children:[y&&(0,j.jsx)("span",{className:"absolute top-2 right-2 z-10 text-xs font-medium uppercase tracking-wider text-neutral-700 dark:text-neutral-300",children:y}),(0,j.jsx)(d.A,{...a,lang:p||e.language,sdk:g||i,onChange:(e,t)=>
1{if("client"===g||"agent"===g){const t="client"===g?"client_lang":"agent_lang",n=new URLSearchParams(location.search);return n.set(t,e),void(0,o.oo)(`${location.pathname}?${n.toString()}`)}g||r(null!=t?t:void 0),(0,o.oo)(`${location.pathname}?lang=${e}`)},className:(0,u.A)(a.className,"my-6"),languageOrdering:e.product&&_.x7[e.product]?Object.keys(_.x7[e.product]):[],apiKeys:t,fixed:!1,children:m})]})},P=(e,t,n="")=>null!=e&&e[t]?e[t]:n,M=({children:e,pageContext:t,location:n})=>{var a,i,r,c;const{frontmatter:s}=t,{json_ld:o}=s,{activePage:d}=(0,T.LV)(),{0:u,1:h}=(0,l.useState)(null!==(a=null===(i=t.languages)||void 0===i||null===(r=i.filter(e=>e.startsWith("realtime")||e.startsWith("rest")))||void 0===r||null===(c=r.find(e=>d.language&&e.endsWith(d.language)))||void 0===c?void 0:c.split("_")[0])&&void 0!==a?a:void 0),M=(0,l.useContext)(A.A),N=P(s,"title"),L=P(s,"meta_description","Ably provides a suite of APIs to build, extend, and deliver powerful digital experiences in realtime. Organizations like Toyota, Bloomberg, HubSpot, and Hopin depend on Ablyâs platform to offload the growing complexity of business-critical realtime data synchronization at global scale."),z=P(s,"intro"),D=P(s,"meta_keywords"),K=P(s,"identifier"),V=(0,C.G)(N,d.product||"pub_sub"),{canonicalUrl:O}=(0,R.Q)(),W=O(n.pathname),B=(0,S.d)(W),Y=(0,l.useMemo)(()=>{if(null!=o){if("object"==typeof o&&!Array.isArray(o))return o;console.warn(`Ignoring invalid json_ld frontmatter on ${n.pathname}: expected an object, received ${Array.isArray(o)?"array":typeof o}.`)}if(!d.languages||d.languages.length<=1)return;const e=d.languages.map(e=>{var t,a;return{"@type":"SoftwareSourceCode",programmingLanguage:null!==(t=null===(a=_.Dq[e])||void 0===a?void 0:a.label)&&void 0!==t?t:e,url:O(`${n.pathname}?lang=${e}`)}});return{"@context":"https://schema.org","@type":"TechArticle",headline:N,description:L,url:W,hasPart:e}},[o,d.languages,N,L,W,n.pathname,O]);(0,p.j)();const $=(0,l.useMemo)(()=>{const e=M.apps&&M.apps.length>0&&M.apps[0].apiKeys.length>0?M.apps:[],t=e.some(({demo:e})=>!e)?e.filter(({demo:e})=>!e):e;return t.length>0?t.flatMap(({name:e,apiKeys:t,demo:n})=>({app:n?"demo":e,keys:t.map(e=>({name:e.name,key:e.whole_key}))})):[{app:"demo",keys:[{name:"demo",key:"demokey:123456"}]}]},[M.apps]);return(0,j.jsxs)(H.Provider,{value:{sdk:u,setSdk:h},children:[(0,j.jsx)(x.p,{title:N,metaTitle:V,canonical:W,description:L,keywords:D,structuredData:Y}),(0,j.jsx)("noscript",{children:(0,j.jsxs)("div",{style:{padding:"1rem",margin:"1rem",border:"1px solid #ccc",borderRadius:"4px",backgroundColor:"#f9f9f9"},children:[(0,j.jsx)("p",{children:(0,j.jsx)("strong",{children:"Looking for machine-readable content?"})}),(0,j.jsxs)("ul",{children:[(0,j.jsx)("li",{children:(0,j.jsx)("a",{href:B,children:"View this page as Markdown"})}),(0,j.jsx)("li",{children:(0,j.jsx)("a",{href:"/llms.txt",children:"Browse all documentation pages (llms.txt)"})})]}),(0,j.jsx)("p",{children:(0,j.jsxs)("em",{children:["Tip: Request pages with ",(0,j.jsx)("code",{children:"Accept: text/markdown"})," header or use a recognized LLM user agent to receive markdown directly."]})})]})}),(0,j.jsx)(I.A,{children:(0,j.jsx)(g.XW,{children:(0,j.jsxs)(w.vX,{components:{If:m.A,Code:e=>(0,j.jsx)(q,{activePage:d,apiKeys:$,...e}),Aside:E.A,Table:g.XI,table:g.XI.Root,thead:g.XI.Header,tbody:g.XI.Body,tr:g.XI.Row,th:g.XI.Head,td:g.XI.Cell,Tiles:y.U,MethodSignature:f.y,Tabs:v.t,Tab:v.o,RequiredBadge:k.A},children:[(0,j.jsx)(b.z,{title:N,intro:z,subtitle:K?(0,j.jsx)("code",{className:"inline-flex items-center rounded border-[0.5px] border-neutral-500 dark:border-neutral-800 bg-neutral-100 dark:bg-neutral-1200 px-1.5 py-[3px] font-mono font-medium text-[20px] leading-normal text-neutral-1000 dark:text-neutral-300",children:K}):void 0}),e]})})})]})};function N(e){return l.createElement(M,e,l.createElement(r,e))}}}]); 2//# sourceMappingURL=component---src-components-layout-mdx-wrapper-tsx-content-file-path-src-pages-docs-auth-identified-clients-mdx-39661e7a349737cedd13.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.