Jump to content
Welcome to our new Citrix community!
  • 0

Citrix Cloud API returning Internal Server Error 500

Shishir Adhikari


Getting below response when sending below query - Powershell script: 

$authEndpoint = "https://api-ap-s.cloud.com/m217v8vcnk97/root/tokens/clients"

# Set the authentication request body
$body = @{
    "grant_type"    = "client_credentials"
    "client_id"     = $clientId
    "client_secret" = $clientSecret
    #"scope"         = "https://api.cloud.com/auth/tenant/.default"

try {
    # Make the REST API call using the Invoke-RestMethod cmdlet
    $response = Invoke-RestMethod -Uri $authEndpoint -Method Post -Body $body

    # Extract the bearer token from the response
    $bearerToken = $response.access_token

    Write-Host "Bearer Token Obtained Successfully: $bearerToken"
catch {
    # Handle any errors that occurred during the API call
    Write-Host "Failed to obtain bearer token: $($_.Exception.Message)"


{ "statusCode": 500, "message": "Internal server error", "activityId": "22372230-395f-40a5-883f-66c8e214d437" }

Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...