Process/Web Service - Bearer Token Authentication

I am trying to configure an outbound call to a web service which requires Bearer Authentication. To authenticate, you first have to make a POST to a /token endpoint using body in application/x-form-www-urlencode format. This is a fairly common authentication scheme, but Creatio currently only supports Basic or OAuth 2.0. That's fine, I thought I'd implement the token call myself, however it appears the only content type supported is JSON. If I try to add a Body parameter, it is expecting a JSONPath. Is there some way to do this that I'm missing? Otherwise, what would it take to allow url-encoded body parameters, or add Bearer Token as a supported authentication scheme?

Like 1

Like

5 comments

Hello Aron,

 

Thank you for your question!

Please, check the screenshot below.  Token is being transferred in header: 

Please let us know if you were able to complete your business task.

 

Best regards,

Bogdan S.

I am also wondering about this.



I need to make a POST request which includes urlencodes in body.



This is the cURL of the request I'm trying to get working:

curl -X POST 'https://{server_address}/api/v2/getpersonaltoken' \
  --data-urlencode 'email={user_email}' \
  --data-urlencode 'password={user_password}'

Postman (working): https://prnt.sc/100p26e

Setup in Creatio: https://prnt.sc/100p5t4



Postman is working. But in Creatio I get this response: 

{"status":"error","message":"Email/password or login_token is missing"}

 

 

Bumping this question again

Julius,



Please use the following request parameters to get the response correctly (you need to add an "Authorization" header and two query parameters):

As a result the business process that uses the webservice with these parameters return the response correctly:

Best regards,

Oscar

Oscar Dylan,

 you are the best!

Show all comments