# Using web and API testing together?

**URL:** <https://forum.katalon.com/t/using-web-and-api-testing-together/63136>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [March 6, 2022, 4:42am UTC](https://forum.katalon.com/t/using-web-and-api-testing-together/63136 "2022-03-06T04:42:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ed.love](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ed.love/32/16104_2.png) [@ed.love](https://forum.katalon.com/u/ed.love)\
**Post date:** [March 6, 2022, 4:42am UTC](https://forum.katalon.com/t/using-web-and-api-testing-together/63136/1 "2022-03-06T04:42:06Z")

</div>

Is this possible? I’m testing a website, but want to use API at the same time so I can set an HTTP header that’s needed for authentication.

Any suggestions would be most welcome.

Thanks from down under!

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [March 6, 2022, 4:52am UTC](https://forum.katalon.com/t/using-web-and-api-testing-together/63136/2 "2022-03-06T04:52:02Z")

</div>

> [@ed.love](#):
>
> Is this possible?

Yes. Use either or both `WS.whatever()`, `WebUI.whatever()`.

---

<div class="post-metadata">

**Author:** ![ed.love](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ed.love/32/16104_2.png) [@ed.love](https://forum.katalon.com/u/ed.love)\
**Post date:** [March 7, 2022, 5:39am UTC](https://forum.katalon.com/t/using-web-and-api-testing-together/63136/3 "2022-03-07T05:39:12Z")

</div>

Thanks for that! I’ve been trying, without luck so far, and was concerned it might not be possible. So with this news, I’ll keep going!

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 7, 2022, 9:00am UTC](https://forum.katalon.com/t/using-web-and-api-testing-together/63136/4 "2022-03-07T09:00:24Z")

</div>

> [@ed.love](#):
>
> I’ve been trying, without luck so far,

You can show us your code and error messages.

My quick guess is that you forgot writing `import` statements.
