PHP Client for Cloudflare API
Iam

Oauth Clients

Oauth Clients endpoint reference.

List

List all the OAuth clients for an account.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
php
$response = $client->iam()->oauthClients()->list('ACCOUNT_ID');
View this operation on the Cloudflare API Reference

Create

Create a new OAuth client.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
valuesarrayYesOAuth Client values, requires client_name, grant_types, redirect_uris, response_types, scopes and token_endpoint_auth_method.
php
$response = $client->iam()->oauthClients()->create('ACCOUNT_ID', []);
View this operation on the Cloudflare API Reference

Get

Get details of a specific OAuth client.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
oauthClientIdstringYesOAuth Client identifier.
php
$response = $client->iam()->oauthClients()->get('ACCOUNT_ID', 'OAUTH_CLIENT_ID');
View this operation on the Cloudflare API Reference

Update

Update an existing OAuth client.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
oauthClientIdstringYesOAuth Client identifier.
valuesarrayNo[]OAuth Client values, e.g. client_name, grant_types, redirect_uris.
php
$response = $client->iam()->oauthClients()->update('ACCOUNT_ID', 'OAUTH_CLIENT_ID', []);
View this operation on the Cloudflare API Reference

Delete

Delete an OAuth client.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
oauthClientIdstringYesOAuth Client identifier.
php
$response = $client->iam()->oauthClients()->delete('ACCOUNT_ID', 'OAUTH_CLIENT_ID');
View this operation on the Cloudflare API Reference

Rotate Secret

Creates a second client secret so you can update your client configuration before deleting the old one.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
oauthClientIdstringYesOAuth Client identifier.
php
$response = $client->iam()->oauthClients()->rotateSecret('ACCOUNT_ID', 'OAUTH_CLIENT_ID');
View this operation on the Cloudflare API Reference

Delete Rotated Secret

Removes the old client secret after a rotation, keeping only the new one.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
oauthClientIdstringYesOAuth Client identifier.
php
$response = $client->iam()->oauthClients()->deleteRotatedSecret('ACCOUNT_ID', 'OAUTH_CLIENT_ID');
View this operation on the Cloudflare API Reference
Copyright © 2026