Agents
in package
Table of Contents
Properties
Methods
- __construct() : mixed
- createValidate() : AgentCredentialValidation
- Validate an agent credential
- getRegistration() : AgentRegistration
- Get an agent registration
- updateAttempts() : ClaimViewResponse
- Link a claim attempt to an external user
Properties
$client read-only
private
HttpClient
$client
Methods
__construct()
public
__construct(HttpClient $client) : mixed
Parameters
- $client : HttpClient
createValidate()
Validate an agent credential
public
createValidate(AgentAdminValidateCredentialRequestType $type, string $credential[, string|null $audience = null ][, RequestOptions|null $options = null ]) : AgentCredentialValidation
Validate an agent credential — an API key or access token — against the environment of the API key used to authenticate the request. This is a read-only check: it never consumes or mutates the credential.
Parameters
- $type : AgentAdminValidateCredentialRequestType
-
The kind of credential being validated — an agent API key or an agent access token.
- $credential : string
-
The credential value to validate: the API key value for
api_key, or the access token (JWT) foraccess_token. - $audience : string|null = null
-
When provided, the access token's
audclaim is verified against this value. Tokens issued for a different resource are rejected. - $options : RequestOptions|null = null
Tags
Return values
AgentCredentialValidationgetRegistration()
Get an agent registration
public
getRegistration(string $id[, RequestOptions|null $options = null ]) : AgentRegistration
Retrieve the details of an agent registration by ID. The registration is scoped to the environment of the API key used to authenticate the request.
Parameters
- $id : string
-
The unique ID of the agent registration.
- $options : RequestOptions|null = null
Tags
Return values
AgentRegistrationupdateAttempts()
Link a claim attempt to an external user
public
updateAttempts(string $type, string $claimAttemptToken, AgentAdminLinkClaimAttemptToExternalUserRequestUser $user[, string|null $organizationId = null ][, RequestOptions|null $options = null ]) : ClaimViewResponse
Link an external user to a claim attempt and retrieve the code needed for the agent to complete the claim. The user is looked up by external ID; if no user exists, one is created. When the user belongs to multiple organizations, an explicit organization must be provided.
Parameters
- $type : string
-
The operation to perform on the claim attempt. Currently only
link_external_useris supported. - $claimAttemptToken : string
-
The token identifying the claim attempt.
- $user : AgentAdminLinkClaimAttemptToExternalUserRequestUser
-
The user to attach to the claim attempt, identified by email and external ID.
- $organizationId : string|null = null
-
The organization to place the agent in. Required when the user belongs to more than one organization.
- $options : RequestOptions|null = null