Connexion API with credentials / bearer token

I'm trying to create a client API connection flow. The information I have to create this feed is:

-the root of the API: http s://mywebsite.com/
-user: "usertest"
-password: "mypassword"
-my endpoint for authentification: http s://mywebsite.com/authentication

And the information that the token returned during authentication is sent in JSON format.

{
“BearerToken”: “{tokenValue}”
}

I have tried several setups and will start from scratch. I'm really new in development and trying to make this connection to my client API properly.

My flow is very simple:

-I have one timestamp for start the flow
-I have a function that sends my credentials in the header
-A post request to the URL: https://mywebsite.com/authentication
-for the moment, one debug for see the status.

I have tried a lot of configuration but with no luck. I would really be grateful if someone would make an example of a connection

I remain really available to follow your directions.

Thanks again in advance

Alexandre

Hi.
Thanks for bringing this up.
Whenever I want to intergrate Node-red in a more complex APIs, I bump into the bearer token problem: very few examples on how to overcome this within node-red.

Since it's on my todo-list to cerate a well documented example for my students, I saved some info that I found online. Didn't have time to dig into it yet though..

This video (from this time) from Thomas Südbröcker is a good start, he is using a flow from his course.

I definetly need to give a look at both :slight_smile:

Please update me if you manage to have a working example.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.