WorkOS PHP SDK

ClientApi
in package

Table of Contents

Properties

$client  : HttpClient

Methods

__construct()  : mixed
createToken()  : ClientApiTokenResponse
Generate a Client API token

Properties

Methods

createToken()

Generate a Client API token

public createToken(string $organizationId, string $userId[, RequestOptions|null $options = null ]) : ClientApiTokenResponse

Generate a short-lived, session-bound token for the Client GraphQL API, scoped to an organization and user.

Parameters
$organizationId : string

The ID of the organization to scope the Client API token to.

$userId : string

The ID of the user to issue the Client API token for.

$options : RequestOptions|null = null
Tags
throws
WorkOSException
Return values
ClientApiTokenResponse
On this page

Search results