How to get bearer token

0
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
4 answers
3

You may try form data for request

answered
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
0

Hello, 

Had the same problem a few weeks back… 
I have build it this way: 

  1. Create Sting with the variable

  1. Set data type to string and paste your bearer token and give it a name what in my case was APISNAGSTREAM

 

 

  1. Go to you’re call REST and to the tab HTTP Header
  2. See Custom HTTP headers

 

 

  1. 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). 

  1. send the request (succesfull) 
  2. Go to Console (left under) 
  3. review the post by clicking the errow. 

 

 

answered
0

Thanks to @RobertPrice and the others. I managed to get a token.

answered