Can't get the conversations using the method get_conversations

Hi, I succesfully created the connection to the API via the PureCloudPlatformClientV2 library and I was trying to use the Conversations API to get the conversations but it appears blank as shown

{'entities': [],
'page_size': 0,
'page_number': 1,
'total': 0,
'first_uri': '/api/v2/conversations?pageSize=0&pageNumber=1',
'next_uri': None,
'previous_uri': None,
'last_uri': '/api/v2/conversations?pageSize=0&pageNumber=1',
'self_uri': '/api/v2/conversations?pageSize=0&pageNumber=1',
'page_count': 0}

This is the code i'm using in case it is of help (only the part for the conversations, i have tested it with other APIs and it works)

authApi = PureCloudPlatformClientV2.AuthorizationApi(apiclient)

Conversations = PureCloudPlatformClientV2.ConversationsApi(apiclient)
api_answer = Conversations.get_conversations().to_dict()

I'd start with changing your page size to a non-zero value. Asking for zero results per page isn't likely to yield a useful response.

Per the description for GET /api/v2/conversations "Get active conversations for the logged in user", this endpoint will only return conversations in which your user is actively participating. Make sure you're connected to a conversation while making this API request.

While this endpoint doesn't explicitly document the not.a.user error code, I would expect this endpoint to only work with user-based logins. Using client credentials won't ever return conversations here because there is no user in context and therefore there can't be any active conversations in that context.

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