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

  • From: hamidreza abroshan <hamidreza.abroshan@xxxxxxxxx>
  • To: program-l@xxxxxxxxxxxxx
  • Date: Wed, 2 Nov 2022 05:49:21 +0330

Hi,
if you installed thunder client,
open vscode and press ctrl+shift+r and hit new request.
if you could not find it, press tab or shift +tab until find thunder client
page.
in the main page, you can navigate the window by pressing up and down keys.
If your coworkers use postman, you can get their postman collection and
import it into thunder client.
hit collections and go down to find the menu. press enter and press import
collection.
I hope this helps.
Best.

On Wed, Nov 2, 2022 at 4:17 AM James Scholes <james@xxxxxxxxxxxxxxxx> wrote:

A bearer token is almost always sent in an "authorization" header with the
request.  So anything that can send HTTP requests with custom headers will
work, e.g. curl on the command line, requests in Python, another HTTP
library in a programming language you're comfortable with, etc.  If you're
specifically looking for a graphical tool that's accessible, someone else
will have to provide suggestions in that area.

Example of curl usage:

curl https://reqbin.com/echo/get/json -H "Accept: application/json" -H
"Authorization: Bearer {token}"

Regards,

James Scholes

On 01/11/2022 at 18:16, Eric Brinkman wrote:
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
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq



-- 
hamidreza

Other related posts: