Calls History not working

Hi,
My goal is to get the data regarding the calls history using the following:

https://api.mypurecloud.ie/api/v2/conversations/calls/history

https://developer.genesys.cloud/developer-tools/#/api-explorer

Using the above explorer I am able to get the results and also when tried to do the same using the CURL command that it provides, it works on the local machine as well. So I proceeded ahead with creating a new client with admin access and access to all the modules.

Now when I try to run the curl using the auth token by the client which I created it shows no results.

curl -X GET -H "Content-Type: application/json" -H "Authorization: bearer <TOKEN FROM API EXPLORER>" "https://api.mypurecloud.ie/api/v2/conversations/calls/history?pageNumber=1&interval=2022-01-27T20%3A00%3A00.000Z%2F2022-01-30T20%3A00%3A00.000Z"
                                        
curl -X GET -H "Content-Type: application/json" -H "Authorization: bearer <NEW OAUTH TOKEN>" "https://api.mypurecloud.ie/api/v2/conversations/calls/history?pageNumber=1&interval=2022-01-27T20%3A00%3A00.000Z%2F2022-01-30T20%3A00%3A00.000Z"
                                        

The First one works get me the data, but the second one has no data.

Kindly help me with this.

The GET /api/v2/conversations/calls/history endpoint operates in the context of the user. If you're using different users to authorize the different requests, I'd expect different results as their call history will be different.

what would be an optimal way to bring the calls history data for all users using curl?

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