angusw | 2021-09-08 05:48:29 UTC | #1
Hello,
I am able to access a bearer token via Basic Auth in postman from the api:
https://login.mypurecloud.com.au/oauth/token
Following this, I am trying to access the following endpoint in postman with my bearer token attached:
https://api.{{environment}}/api/v2/analytics/conversations/aggregates/query
With the following body:
{
"interval": "2021-09-06T14:00:00.000Z/2021-09-07T14:00:00.000Z",
"groupBy": [
"userId"
],
"views": [],
"metrics": [
"tTalk",
"tWait"
]
}
However the body reponse is returning
{
"message": "Invalid login credentials.",
"code": "bad.credentials",
"status": 401
}
not sure why, as I have "full access" to the analytics api according to my system administrator
any help would be greatly appreciated.
Thanks
anon11147534 | 2021-09-08 08:37:40 UTC | #2
Hi,
It's hard to know exactly what the issue is here. Please review Grant - Client Credentials for the full list of instructions on how to use client credentials.
The api-explorer and CLI will be easier to work with because they handle the authentication with the API. Also, if you're looking to do some programming using the API we have a number of SDKs available in multiple languages.
system | 2021-10-09 08:38:09 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 11941