# How can add authorisation type in API testing?

**URL:** <https://forum.katalon.com/t/how-can-add-authorisation-type-in-api-testing/8000>\
**Category:** Miscellaneous\
**Tags:** katalon-studio\
**Created:** [May 16, 2017, 7:55am UTC](https://forum.katalon.com/t/how-can-add-authorisation-type-in-api-testing/8000 "2017-05-16T07:55:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pranesh](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@pranesh](https://forum.katalon.com/u/pranesh)\
**Post date:** [May 16, 2017, 7:55am UTC](https://forum.katalon.com/t/how-can-add-authorisation-type-in-api-testing/8000/1 "2017-05-16T07:55:01Z")

</div>

Every API testing tool has authorisation types Basic,NTLM,Kerberos,OAuth 2.0,OAuth 1.0

but in katalon i can only able to find basic type,how can i OAuth 2.0 type in katalon?

---

<div class="post-metadata">

**Author:** ![Marek\_Melocik](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/marek_melocik/32/371_2.png) [@Marek\_Melocik](https://forum.katalon.com/u/Marek_Melocik)\
**Post date:** [May 16, 2017, 12:14pm UTC](https://forum.katalon.com/t/how-can-add-authorisation-type-in-api-testing/8000/2 "2017-05-16T12:14:41Z")

</div>

You can send OAuth token in request header like this:

`def static request(String token) { RequestObject req = new RequestObject('test') TestObjectProperty prop1 = new TestObjectProperty() prop1.setName('Authorization') prop1.setValue(token) List<TestObjectProperty> headers = new ArrayList<TestObjectProperty>() headers.add(prop1) req.setRestRequestMethod("GET") req.setRestUrl("https://www.google.sk") req.setHttpHeaderProperties(headers) def respRaw = WS.sendRequest(req)`` }`

---

<div class="post-metadata">

**Author:** ![albert.vu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/albert.vu/32/20595_2.png) [@albert.vu](https://forum.katalon.com/u/albert.vu)\
**Post date:** [August 8, 2022, 7:25am UTC](https://forum.katalon.com/t/how-can-add-authorisation-type-in-api-testing/8000/3 "2022-08-08T07:25:03Z")

</div>

Archived on August 8, 2022, 7:25am UTC


