Hello guys, I'm having some problem what I can't understand correctly. I have one endpoint from Microsoft API (documentation link below) what return a list of events from my calendar, and I can apply some filters in the query just like that :
The endpoint is like thathttps://graph.microsoft.com/v1.0/me/calendar/events?$filter=startsWith(subject,'Test')
and it works (with the correct header and authentication)
my problem start with when I try use a variable in the query like thathttps://graph.microsoft.com/v1.0/me/calendar/events?$filter=startsWith(subject,'{SearchKeyWord}')
in test it works, but when I use in the flow this return a error 400, I can't understand why.
in test
In a real use
Microsoft API Documentation: https://learn.microsoft.com/en-us/graph/api/user-list-events?view=graph-rest-1.0&tabs=http
Hey Ahmed Essawy, I will close the topic, I can't find the problem, but I maked some alterations and resolve the problem....Appreciate the attention and help !
For some reason this work like that
The issue you're experiencing is strange, error 400 means bad request so you may did not send the request as expected please debug you request in the Outsystems service studio, you may be have additional space on the Bearer token also take the values from the debug and re-test the exact values on API tool like postman to investigate your issue more deep.
also expand the response may add more information
Thanks for the answer... There is nothing in the response, it is just empty, on the other hand, when I copy the authentication parameter to a API tool, it works too, I look with careful and don't have a additional space on the Bearer token.
Please check the screenshots below, I gave it a wrong bearer, and the API replied with 401 error (Unauthorized) which is fine and indicates that I am calling it as expected, as you are face 400 error that means bad request, so please double check the URL, quotes, and everything also try to update your service studio to the latest version.
Could you share the application file *.OML without your credentials to troubleshoot with you?
I don´t think this is the way, when I request without a input parameter, this work, and retrieve the events I need, but when use a variable it don't works... the url structure its working and the bearer auth tooBelow is a example where I test without the input parameter "SearchKeyWord"
You need use a valid token to test, if use a invalid token it return 401, but with a valid token return 400
Perfect I am happy to hear that.