WebexPythonSDK icon indicating copy to clipboard operation
WebexPythonSDK copied to clipboard

Problem iterating through direct messages

Open lhahle opened this issue 5 years ago • 1 comments

Hi! Thanks for creating this, it helped me out a lot so far. However, I am experiencing an issue when trying to iterate through direct messages between me and another user. The error message I get tells me to only provide one destination in personId and personEmail, which I clearly do. Here's the code: messages = api.messages.list_direct(PersonId=VACCELERATOR_ID) testlist=[] for r in messages: testlist.append(r.id)

This is the error message I get: webexteamssdk.exceptions.ApiError: [400] Bad Request - Provide only one destination in the personId and personEmail fields [Tracking ID: ROUTER_5FD10597-724E-01BB-58DA-AC12FAA058DA]

lhahle avatar Dec 09 '20 17:12 lhahle

I also had trouble with that. I was able to get around the issue by using personEmail instead of personId. That said, it would be nice to see why we can't select by ID.

cp-community avatar Jan 21 '21 08:01 cp-community

Closing this issue as it is more than three years old.

I note the provided code sample using a PersonId parameter, which isn't valid. The correct Person ID parameter is personId. The SDK isn't manipulating the contents of the personId parameter, so if there was an API bug with this request call, it would likely have been an API bug.

cmlccie avatar Feb 19 '24 18:02 cmlccie