User API
The User API provides access to operations for the currently authenticated user. All operations in this API affect only your own profile and resources.
Quick Links
| API | Property | Description |
|---|---|---|
| Profile | cf.User |
View and edit your user profile |
| Memberships | cf.User |
Manage your account memberships |
| Invitations | cf.User |
Accept or reject account invitations |
| API Tokens | cf.ApiTokens |
Manage your personal API tokens |
| Audit Logs | cf.AuditLogs |
View your activity logs |
Authentication
All User API operations use the currently authenticated API token. The operations affect only the user who owns the token.
public class UserService(ICloudflareApiClient cf)
{
public async Task<User> GetProfileAsync()
{
return await cf.User.GetUserAsync();
}
}
User vs Account Operations
| Feature | User API | Account API |
|---|---|---|
| Scope | Self only | All account resources |
| Profile | Edit own profile | N/A |
| Memberships | View/leave accounts | Invite/manage members |
| Invitations | Accept/reject | Send invitations |
| API Tokens | Personal tokens | Account-scoped tokens |
| Audit Logs | Own activity | All account activity |
Related
- Account Management - Manage accounts
- Getting Started - SDK setup