API Expose, Consume & add Authentication using Bearer Token
Application Type

Hey OS Community.

I am working on my project where i have two api one is expose and another one is consume that expose api. Where i am using  basic authentication i also pass Username and Password in Basic Authentication(As you can see in Screen Shot). Now i also generate Token and send into request  HTTP header of consume api with name : "Authentication" and  Value : "dkadjdjvjnuwufsnv". Now i want to pass this token and want to validate that token and want to done "Authentication using  Bearer token ". Can anyone explain me flow or point out my mistake what am done wrong.

That is My Expose Api which is Create By Me and using Basic Authentication. 

This is my Consume APi.

Here am Generating JWT Token in OnBeforeRequest Action which is in Consume API and Assign to HTTP Header and Also assign it too Customize Request when i debug that i find in debugging window that new header Authorization with name and value appear in header.

Now What i do For Authentication using Bearer Token.

Here am also add my method where i test that api it gives me reponse and status code 200.

Hi @Apoorv choubey ,

Are you passing token here?

Yes @Aadhavan Shanmugam i was try to token value here but a local variable is not accessible here now what i wil do ??

Hi @Benjith Sam i  am looking Authentication using token that post you share here basic authentication with dynamically. Yes i also want to that but before i want to authenticate using token with basic.

Anyone ??

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.