Most of the APIs are not returning data

I am trying to pull data for certain APIs but I am getting 403 or 400 or 500 errors for them.
Here are the APIs for which the data is not returning:

  • Conversations
  • Analytics
  • Geolocations
  • Languages
  • Recordings

But I am able to pull data for the following APIs - Users, Routing.

Screenshot attached of the error below -

Here is the error which I am getting when integrated GetCalls method from conversations/calls API in the code -

Error calling GetCalls: {"status":400,"code":"not.a.user","message":"This request requires a user context. Client credentials cannot be used for requests to this resource."}

Here's some information on Response Codes that will be returned from the API. If you get anything other than a 2xx response, you've done something incorrectly.

For the GET /api/v2/conversations resources (and all resources in that path), they will not work with client credentials because client credentials are not linked to any user, and therefore cannot have any conversations accessible to them. You can use the analytics resources with client credentials, however.

I am getting the same message when attempting to call "ConversationsAPI.GetCalls" while using client credentials. That completely makes sense.

Where I'm seeing inconsistency, though, is that I don't get that error when calling "GetChats" or "GetEmails". Shouldn't I be getting the same errors there?

Hey Tim, can you help me understand what kind of credentials need to be used to pull conversations resources?

Yes, you should be. I checked and the user validation is not applied uniformly across those resources. I've created API-1798 to address the lack of user validation on those resources. Generally, you can't use client credentials for any conversation resources.

Either of the Authorization types that aren't client credentials.

We need to pull data for all users in the API calls. So I think we need to use Client Credentials. What permissions do we need to have setup in order to be able to get data for all users on the items below.

  1. Call Data – duration, hold time, etc, users talked to, ANI, cust account entered if any, recording id, language
  2. Chat Data – same as above
  3. Metrics by user, conversation type
  4. Recordings
  5. Users – languages supported,

Analytics API

  1. How do we get metrics for multiple intervals. If I want to get the metrics for the full day yesterday in 15 min increments?
  2. Can you point us to documentation that explains the terms used in the input options. For example, what is MediaType (call, chat, email?) and Purpose?
  3. Same documentation question for output data. Is each Participant a step in the flow?
  4. We’ve been able to pull call data, but we haven’t been able to capture any chat data.

Screen pops
We are trying to open a specific page from our homegrown CRM using a unique URL in to the PureCloud script window.

  1. The URL would have to be specific to each customer. How does that get configured in PureCloud?
  2. How does the process flow work in this case?
  3. Do the datadip api calls need to return a URL or do we need to have a URL setup in a specific way on our side?

I've created new topics for your new questions and am looking into answers: