Hello everyone. Does anyone know what I need to fix to get a Bearer token in Mendix that I would later use for a post request. When I run microflow via button I get an error – bad request, while in POSTAMN with the same data (Identity Server for authorization, url, x-www-form-urlencoded) I get a token. I attaching screenshots from Mendix and Postman.
You may try form data for request
Quang Nhat Tran
Don’t set the content-type, I think it is set automatically if you use Form Data.
I think your Request box should look something like this.
Hope this helps
Had the same problem a few weeks back…
I have build it this way:
Create Sting with the variable
Set data type to string and paste your bearer token and give it a name what in my case was APISNAGSTREAM
Go to you’re call REST and to the tab HTTP Header
See Custom HTTP headers
Now you have put you're token in the bearer and it should work!
EDIT (how do you view bearer in postman)
You van view how postman sends info to the endpoint (API).
send the request (succesfull)
Go to Console (left under)
review the post by clicking the errow.
Thanks to @RobertPrice and the others. I managed to get a token.