diff --git a/docs/references/backend/client/get-client.mdx b/docs/references/backend/client/get-client.mdx index 0127c689df..374a9da6f3 100644 --- a/docs/references/backend/client/get-client.mdx +++ b/docs/references/backend/client/get-client.mdx @@ -3,9 +3,11 @@ title: getClient() description: Use Clerk's Backend SDK to retrieve a single client by its ID. --- +{/* clerk/javascript file: https://github.com/clerk/javascript/blob/main/packages/backend/src/api/endpoints/ClientApi.ts#L19 */} + # `getClient()` -Retrieves a single [`Client`](/docs/references/javascript/client) by its ID, if the ID is valid. +Retrieves a single [`Client`](/docs/references/javascript/client). ```tsx function getClient: (clientId: string) => Promise; @@ -20,19 +22,19 @@ function getClient: (clientId: string) => Promise; ## Example ```tsx -const clientId = 'client_2b6J9fCrQt0KRCCtFu7WCIQvSfd'; +const clientId = 'client_123'; const response = await clerkClient.clients.getClient(clientId); console.log(response); /* _Client { - id: 'client_2b6J9fCrQt0KRCCtFu7WCIQvSfd', - sessionIds: [ 'sess_2b6M8I4VZ1wMtgXGQeDe3SJD3cG' ], + id: 'client_123', + sessionIds: [ 'sess_123' ], sessions: [ [_Session] ], signInId: null, signUpId: null, - lastActiveSessionId: 'sess_2b6M8I4VZ1wMtgXGQeDe3SJD3cG', + lastActiveSessionId: 'sess_123', createdAt: 1705529444202, updatedAt: 1705530913279 } diff --git a/docs/references/backend/client/verify-client.mdx b/docs/references/backend/client/verify-client.mdx index ed1e81e240..4acd70c0a9 100644 --- a/docs/references/backend/client/verify-client.mdx +++ b/docs/references/backend/client/verify-client.mdx @@ -3,9 +3,11 @@ title: verifyClient() description: Use Clerk's Backend SDK to retrieve a client for a given session token, if the session is active. --- +{/* clerk/javascript file: https://github.com/clerk/javascript/blob/main/packages/backend/src/api/endpoints/ClientApi.ts#L27 */} + # `verifyClient()` -Retrieves a [`Client`](/docs/references/javascript/client) for a given session token, if the session is active. +Verifies the [`Client`](/docs/references/javascript/client) in the provided token. ```tsx function verifyClient: (token: string) => Promise;