# Status 500 error

**URL:** <https://devforum.zoom.us/t/status-500-error/92207>\
**Category:** GraphQL\
**Tags:** graphql\
**Created:** [July 21, 2023, 7:12pm UTC](https://devforum.zoom.us/t/status-500-error/92207 "2023-07-21T19:12:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sany](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@sany](https://devforum.zoom.us/u/sany)\
**Post date:** [July 21, 2023, 7:12pm UTC](https://devforum.zoom.us/t/status-500-error/92207/1 "2023-07-21T19:12:04Z")

</div>

I am trying to use powerShell script to get data from graphql queery but have been getting this error.  
I have correct bearer token as I have tried using same token in postman and getting the required result…

```auto
$graphqlUri = "https://api.zoom.us/v3/graphql"

$graphqlQuery = @"
query GetUserMeetingInfo(${meetingQueryType}: MeetingQueryType!, ${withDurationInMinutes}: Boolean!) {
    aggrUser: user(userId: "me") {
      ...userInfoAndMeetings
    }
  }
  
  fragment userInfoAndMeetings on User {
    profile {
      id
      firstName
      email
      type
      personalMeetingId
      group
      {
        name
        id
      }
    }
    meetings(first: 10, meetingType: $meetingQueryType) {
      edges {
        id
        topic
        type
        durationInMinutes @include(if: $withDurationInMinutes)
      }
      pageInfo {
        hasNextPage
        cursor
      }
    }
  }
"@

$variables = @{
    meetingQueryType = "SCHEDULED"
    withDurationInMinutes = $true
}

# Setting headers for GraphQL request
$graphqlHeaders = @{
    "Authorization" = "Bearer $bearerToken"
    "Content-Type" = "application/json"
}

# Setting the body as JSON with the query and variables
$graphqlBody = @{
    query = $graphqlQuery
    variables = $variables
} | ConvertTo-Json

# Make the GraphQL API call
#$graphqlResponse = Invoke-RestMethod -Uri $graphqlUri -Method 'POST' -Headers $graphqlHeaders -Body $graphqlBody
# Make the GraphQL API call using Invoke-WebRequest
$graphqlResponse = Invoke-WebRequest -Uri $graphqlUri -Method 'POST' -Headers $graphqlHeaders -Body $graphqlBody

```

```auto
Line |
 163 | … lResponse = Invoke-RestMethod -Uri $graphqlUrl -Method 'POST' -UseBas …
     | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | {"timestamp":1689966415021,"status":500,"error":"Internal Server Error","path":"/nws/openapi/graphql"}
null

```

````auto
Line |
  95 | … lResponse = Invoke-WebRequest -Uri $graphqlUri -Method 'POST' -Header …
     | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | {"timestamp":1690003896198,"status":500,"error":"Internal Server Error","path":"/nws/openapi/graphql"}```

````

Tried to use RestMethod and WebRequest but is the same error

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [November 27, 2023, 8:27pm UTC](https://devforum.zoom.us/t/status-500-error/92207/2 "2023-11-27T20:27:05Z")

</div>

@sany can you provide steps to reproduce this error please?
