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

  • From: James Scholes <james@xxxxxxxxxxxxxxxx>
  • To: program-l@xxxxxxxxxxxxx, Eric Brinkman <eric.brinkman1@xxxxxxxxx>
  • Date: Tue, 1 Nov 2022 18:47:27 -0600

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

Other related posts: