# Store AUTH TOKEN in Global Variable

**URL:** <https://forum.katalon.com/t/store-auth-token-in-global-variable/10743>\
**Category:** API Testing\
**Tags:** api-testing, katalon-studio\
**Created:** [May 7, 2018, 2:33pm UTC](https://forum.katalon.com/t/store-auth-token-in-global-variable/10743 "2018-05-07T14:33:30Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![sang](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/sang/32/6357_2.png) [@sang](https://forum.katalon.com/u/sang)\
**Post date:** [July 23, 2019, 2:09pm UTC](https://forum.katalon.com/t/store-auth-token-in-global-variable/10743/6 "2019-07-23T14:09:34Z")

</div>

Hi [**Julian\_Wladyczynski**](http://forum.katalon.com/u/Julian_Wladyczynski)

Please retry by following this step:

**1. Assigned access\_token value to the GlobalVariable**

```
response = WS.sendRequest(findTestObject('Employees/Login backoffice and get access token'))
WS.verifyResponseStatusCode(response, 200)
JsonSlurper slurper = new JsonSlurper()
Map parsedJson = slurper.parseText(response.getResponseText())
String access_token = parsedJson.access_token
GlobalVariable.Token = access_token

```

**2. On the GET request, set the Variable as below.**

 ![38%20PM](https://europe1.discourse-cdn.com/katalon/original/2X/6/615455098c602c7704a4929ce2a8e1a17c168dcb.png)

**3. Using the access\_token in the request header.**

 ![32%20PM](https://europe1.discourse-cdn.com/katalon/original/2X/4/4ae0c1196648fa451e2cd549b5cfd3fdd303a92f.png)

Hope this helps.

---

_[View the full topic](https://forum.katalon.com/t/store-auth-token-in-global-variable/10743)._
