HTTP Request Get Token

Hello,

I am new to using N8N.

I am using PostMan to call an API. This particular API is using a token. It is clear to me that I have to configure 2 HTTP Request components to 1st get the token 2nd call the API to get data.

My question is about what would be the right properties to be added in the HTTP Request component to get this token. I am using Basic Authentication.

Thanks

@BW_D Welcome to the community.

According to this, for the first step should look as follow:

This step will return an access token that you are going to use in the second step as follow:

Notice that you need to use an expression to reference the access token returned in the first step.

thanks @RicardoE105

1 Like

I added all required parameters, and it is showing the message “ERROR: 400 - {“error”:“unsupported_grant_type”}”. What it would be?

mmm weird, that is value it’s suppose to take according to the specification. Can you share the docs of the API you are trying to consume? So that I can have a better look.

Just curious, did you tweak the default css styles for your n8n instance?

It worked. It was required to add the Body Content-Type in Options. Thanks, @RicardoE105 for your help with this.

1 Like

{
“order_detail”: {
…some data
}
},

Not sure what is the question here. Can you please elaborate?