[program-l] Re: How can I test an API using a bearer token?

  • From: hamidreza abroshan <hamidreza.abroshan@xxxxxxxxx>
  • To: program-l@xxxxxxxxxxxxx
  • Date: Fri, 4 Nov 2022 22:46:41 +0330

Hi again,
You asked about automatic auth pre request.
take a look here.
https://github.com/rangav/thunder-client-support#setenv
The Thunder client is amazing.
Best.


On Thu, Nov 3, 2022 at 4:54 PM Darko Milošević <daremc86@xxxxxxxxx> wrote:

Hi,
I am using postman with NVDA, and I can do the basics to test the API.
Also, I'm Nod.JS backend developer, and using the postman very often to
test my endpoints.
Install, and start the Postman.
When the Postman runs, press CTRL+N to open New request, and then use down
arrow to find HTTP request, and then hit Space.
Then, press CTRL+Home to jmp to the top of page, and go with down arrow
until you find Method.
Press Enter on GET, and then delete GET, and type POST, and press Tab.
In nex edit field, type your endpoint address, including the endpoint, eg:
127.0.0.1/api/myendpoint
Then, hit ESC, and go with down arrow until you find Headers, and hit
Space.
Go with down arrow, until you here Bulk Edit, and more once until you here
Key, and hit Space.
In the edit Field, type:
Content-Type
Then Press TAB, and type:
application/json; charset=UTF-8
Then go with Tab twice, and type:
Authorization
Then more once Tab, and type:
Bearer token
Type your token instead the token word
Then, press ESC.
Use up, or down arrow, until you find Body, and hit Space.
Then use down arrow, until you find Raw, and hit space.
Then in the next edit field, type your body parameters in the JSON format.
Then, press ESC, and go with up arow until you hear send, and hit space.
Then use your down arrow to see the response.

That's it.

žBest regards,




Darko.

sri, 2. stu 2022. u 01:16 Eric Brinkman <eric.brinkman1@xxxxxxxxx>
napisao je:

I'm being asked to test a MuleSoft endpoint by authenticating with a key
and secret, obtaining a bearer token, and then using the token to log in
and send data to the endpoint.  My co-workers are using Postman to do this,
but that app is not accessible.  I've installed Thunder Client for VS Code
but can not figure out how to get it to do this.  Reading my co-worker's
Postman script just confuses me.  I've been told I need to use an app that
supports API key authentication.  Do any of you know how to do this?

Thanks,
Eric



--
Darko Milošević

QTH:JN93QI

Call Sign:4O4DMC



-- 
hamidreza

Other related posts: