Forum Discussion
christosjubile
Jul 25, 2021Brass Contributor
Apply filter on GET /beta/users/<user_id>/chats/getAllMessages fails
Hello I have a call at the endpoint:
/beta/users/<user_id>/chats/getAllMessages?$filter="lastModifiedDateTime gt 2021-07-18T00:00:00.000Z"
with the below code:
url = '%sbeta/users/%s/chats/getAllMessages?$filter="lastModifiedDateTime gt %sT00:00:00.000Z"' % (ms_api_url, user_id, before7days.strftime("%Y-%m-%d"))
response = requests.get(url,
headers = {
'Authorization': 'Bearer %s' % access_token
}).json()
but I am geting the below error:
{
'error': {
'code': 'BadRequest',
'message': 'Invalid filter clause',
'innerError': {
'date': '2021-07-25T09:04:49',
'request-id': '590c724f-e161-44de-a8d9-a011dec40b6e',
'client-request-id': '590c724f-e161-44de-a8d9-a011dec40b6e'
}
}
}
what am I doing wrong?
No RepliesBe the first to reply