# Bearer Token not generated

**URL:** <https://forum.katalon.com/t/bearer-token-not-generated/47422>\
**Category:** API Testing\
**Tags:** api-testing, katalon-studio\
**Created:** [September 16, 2020, 9:14pm UTC](https://forum.katalon.com/t/bearer-token-not-generated/47422 "2020-09-16T21:14:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsp](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/gsp/32/20464_2.png) [@gsp](https://forum.katalon.com/u/gsp)\
**Post date:** [September 16, 2020, 9:14pm UTC](https://forum.katalon.com/t/bearer-token-not-generated/47422/1 "2020-09-16T21:14:12Z")

</div>

I am newbie. Upgraded from postman to Katalon. Used same headers and credentials.  
Still unable to generate access token. Any idea what when wrong in here. any setting to be done at Katalon ?

Body as:

 ![image](https://europe1.discourse-cdn.com/katalon/original/2X/1/1fe575c35f371dae3eb3f017b513944f3779478b.png)  
using Headers as:  
 ![image](https://europe1.discourse-cdn.com/katalon/original/2X/8/8945f5d1e390bcf1d4cade24912397901aa5c3f6.png)

---

<div class="post-metadata">

**Author:** ![huynguyen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/huynguyen/32/552_2.png) [@huynguyen](https://forum.katalon.com/u/huynguyen)\
**Post date:** [September 17, 2020, 5:27pm UTC](https://forum.katalon.com/t/bearer-token-not-generated/47422/2 "2020-09-17T17:27:42Z")

</div>

Hi @gsp,  
Can you share the Katalon request file (.rs file) together with Postman collection file?

---

<div class="post-metadata">

**Author:** ![gsp](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/gsp/32/20464_2.png) [@gsp](https://forum.katalon.com/u/gsp)\
**Post date:** [September 17, 2020, 6:48pm UTC](https://forum.katalon.com/t/bearer-token-not-generated/47422/3 "2020-09-17T18:48:19Z")

</div>

Hi @huynguyen Have uploaded the required data to debug hope it help. Unable to do so due to security reasons. Let me know if that suits, postman file have variables used which updated in Katolon file and used directly  
[Samplepostmandbody\_fortestonlysamplebody.txt](https://forum.katalon.com/uploads/short-url/qWH3ABNKiGJwYwmfwmIydc1Xdcj.txt) (805 Bytes) [TokenPostRequestKaton.txt](https://forum.katalon.com/uploads/short-url/1mSpDbaWXus07QWzv7VgEmKwaJ.txt) (3.4 KB)

---

<div class="post-metadata">

**Author:** ![anon46315158](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@anon46315158](https://forum.katalon.com/u/anon46315158)\
**Post date:** [September 18, 2020, 7:58am UTC](https://forum.katalon.com/t/bearer-token-not-generated/47422/4 "2020-09-18T07:58:31Z")

</div>

@gsp without access to your postman collection and env files it is hard to say how do you actually get the token.  
I suppose when you do it in postman, those env/global variables used into the body are somehow populated (by a previous request or by the ‘pre’ script)

Please look into your postman collection at the ‘Pre-request’ script for the request in subject … any code there?

Note that, when you import the requests in Katalon, the Pre and Test script are not imported … because katalon cannot interpret JS+Postman snippets directly, so you will have to adapt them to groovy/java (use a test-case for this)

---

<div class="post-metadata">

**Author:** ![gsp](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/gsp/32/20464_2.png) [@gsp](https://forum.katalon.com/u/gsp)\
**Post date:** [September 18, 2020, 2:45pm UTC](https://forum.katalon.com/t/bearer-token-not-generated/47422/5 "2020-09-18T14:45:10Z")

</div>

Hi @anon46315158, Thanks for you thoughts, Initially i did imported, and seeing that not working i manually created this token request. Able to generate token.  
Thank you 🙂

Let me know if i can create variables that can be used like for URL and unique values ?

1. Save values in variable
2. Response time Test  
Thanks
