Bearer Authentication
Bearer authentication uses tokens for authorisation. Whenever a login request is sent, the server generates a Bearer token. These encrypted strings must be added to the HTTP header and sent with the request.
Step 1: Create a New Web Service request.
Step 2: Select the request method and enter the URL. Add query parameters, if any.
Step 3: Navigate to the Authorisation tab and select Bearer from the drop-down menu for Type.
Step 4: Enter the Bearer token for the request and click on Update to HTTP Header.

The token gets added to the HTTP request header. It can be viewed in the HTTP Header tab.

Frequently Asked Questions
How to generate Bearer tokens for Authorisation in Katalon Studio?
Bearer tokens are access tokens used with OAuth. OAuth 1.0 and OAuth 2.0 authorisation can generate bearer tokens.
What is the drawback of Basic Authentication?
Basic Authentication is extremely simple and vulnerable as it uses only a username and password for authorisation. It is not compatible with two-step verification techniques.
What is the advantage of using Bearer Tokens?
Bearer tokens do not require complex libraries to make requests. It is straightforward and easy to implement.
Conclusion
This blog explains the Basic and Bearer Authentication methods for authorising web service requests in Katalon Studio. Check out our articles on Generate Test Steps in Manual and Script View, Manage Test Projects in Katalon and Manage Mobile Test Objects in Katalon.
Explore our Library on Coding Ninjas Studio to gain knowledge on Data Structures and Algorithms, Machine Learning, Deep Learning, Cloud Computing and many more! Test your coding skills by solving our test series and participating in the contests hosted on Coding Ninjas Studio! Looking for questions from tech giants like Amazon, Microsoft, Uber, etc.? Look at the problems, interview experiences, and interview bundle for placement preparations. Upvote our blogs if you find them insightful and engaging! Happy Coding!
