Client/v4/user powershell API call fails

Win 2022, client/v4/user powershell API call fails. I am unaware of why this should be failing. Brand new token. I am domain/zone owner.

Test Base URI by fetching user details

try {
$userResponse = Invoke-RestMethod -Uri “$baseUri/user” -Method Get -Headers $headers
Write-Output “Authenticated User: $($userResponse.result.email)”
} catch {
Write-Output “Failed to authenticate or access Cloudflare API base URI (user).”
exit

$baseUri = “https://api.cloudflare.com/client/v4
Bearer Token provided.

Permissions issue with the Token creation - my fault.

Cheers,

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.