I am able to query genesys cloud's GET Routing Skill API via postman . But conversation details api (which uses some query params) is giving me below error . I am first using API explorer to get results and using that query in POSTMAN body .I think i am making some mistake in passing the body in POSTMAN .
"403 ERROR
The request could not be satisfied.
Bad request. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation. "
@garimabalodi
Please regenerate your client secret IMMEDIATELY and check your org for unauthorized access. I edited your credentials out of your post, but they were exposed to the open internet for some time. Your client secret must be handled like a password.
What I would recommend is to start by using proper header values in your postman request.
I see that you are sending this request with Content-Type: application/x-www-form-urlencoded
Such API endpoints are application/json.
I also see you are sending a Content-Length of 385 when your request appears to be a GET - which usually don't have bodies.
I also see that your request in Dev Tools is GET /api/v2/routing/skills/{skillId} when your Postman request is GET https://api.aps1.pure.cloud/api/v2/analytics/conversations/details, ...
@garimabalodi you also have an extra slash in the path in the request. This is likely malforming the request and causing it to not be routed to the API correctly because the path is incorrect. That's why you're getting an HTML error page instead of an error payload from the API; your request isn't reaching the API service.
You are not using the right endpoint or you are using it improperly.
Your screenshot shows GET /api/v2/analytics/conversations/details with a body where you have set interval/filters.
That's not correct.
This GET API endpoint take an input parameter - id (the conversation id) as path/query parameter - i.e. GET /api/v2/analytics/conversations/details?id=YOUR_CONVERSATION_ID
@garimabalodi I'd strongly recommend using the API Explorer tool Jerome linked. It will do the heavy lifting for you and guide you to create a successful request. Once you have a query working to your liking, you can then stare and compare your postman configuration against the working API Explorer request to configure postman correctly.
I figured out how to get an HTML error like that. I'm getting a 400 instead of a 403, but it's the same format. The cause is an inappropriate content type. You're not using text, you're trying to send json, so change that dropdown in postman accordingly. Also decide which endpoint you're using; your screenshot shows the GET endpoint, but you're sending a JSON body that goes with the POST /query endpoint.