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.
asked
Petar Buric
5 answers
4
You may try form data for request
answered
Quang Nhat Tran
1
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
answered
Robert Price
0
Hello,
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!
Goodluck!
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.
answered
Mathijs Schijvenaars
0
Thanks to @RobertPrice and the others. I managed to get a token.
answered
Petar Buric
0
the above solution worked for me.
just sharing another example of how this can be done.