Legacy Dev Forum Posts

 View Only

Sign Up

Most of the APIs are not returning data

  • 1.  Most of the APIs are not returning data

    Posted 06-05-2025 18:04

    sneha | 2016-07-27 15:30:02 UTC | #1

    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 - <img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/8dba1f81c4825a9aece3050ee60682322c90c018.PNG" width="690" height="209">

    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."}


    tim.smith | 2016-07-27 16:24:37 UTC | #2

    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.


    canderson | 2016-08-02 19:09:46 UTC | #3

    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?


    steve | 2016-08-02 19:16:50 UTC | #4

    tim.smith, post:2, topic:184
    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.

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


    tim.smith | 2016-08-02 19:35:25 UTC | #5

    canderson, post:3, topic:184
    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?

    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.


    tim.smith | 2016-08-02 19:36:17 UTC | #6

    steve, post:4, topic:184
    Hey Tim, can you help me understand what kind of credentials need to be used to pull conversations resources?

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


    steve | 2016-08-05 17:00:35 UTC | #7

    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?

    tim.smith | 2016-08-05 17:06:17 UTC | #8

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

    https://developer.mypurecloud.com/forum/t/what-permissions-are-required-for-a-client-credentials-role/251

    https://developer.mypurecloud.com/forum/t/analytics-api-questions/252

    https://developer.mypurecloud.com/forum/t/how-to-screen-pop-for-a-call/253


    system | 2017-08-28 19:25:39 UTC | #9


    This post was migrated from the old Developer Forum.

    ref: 184