Getting error while applying a Bearer Token in whole collections

Hi, I don’t get the proper response while using JWT token centrally(applying the same token to all collections).

Image of the response after configure Bearer token centrally

On the other hand if I config bearer token authorization collection-wise I am getting a response and it’s working perfectly.

Please help.

Hi @santunu23

There is no space between “bearer” and your token … this will likely be an issue;

Add a space after “bearer”, eg:
bearer eyJhbGC...

Can you show the headers for this;


My guess would be that the “Authorization” header value doesn’t have the “Bearer” prefix.

Here is the header info. Thank you.

I stand corrected, it looks right.

Is your auth being set at collection or folder level?
If folder, is the API request you are sending inside that folder?

I tried to set it to folder level but can’t get a response. So I set up the collection level.

so do you have 2 auth levels set?
Have you removed the folder level auth?

For now, I removed folder level auth, temporary the setting is working fine with the collection level. Although my aim is to config folder level auth. But I don’t get the response.

Inherit from parent should work at folder level as long as the HTTP request is inside that folder. Are you sure that the request is a child of the folder where you set the auth?

Yeah, I am sure, right now I am running child under a folder. So I have no doubt about that. Hence, I am also reviewing my code. Maybe there is some misconfiguration.

Folder-level auth worked for me… So just a thought, when you edited the folder auth, did you click save?

Yes, I did save my folder-level auth setting.

Dear @w4dd325, the problem is solved. The problem was raised in the serverside script. In the script(not in the postman) I forgot to put an extra space after the ‘Bearer’ keyword. Thank you so much for your tremendous support.

1 Like