# How to resolve encrypted password for webservice call

**URL:** <https://forum.katalon.com/t/how-to-resolve-encrypted-password-for-webservice-call/32514>\
**Category:** API Testing\
**Tags:** api-testing, katalon-studio\
**Created:** [September 3, 2019, 5:21pm UTC](https://forum.katalon.com/t/how-to-resolve-encrypted-password-for-webservice-call/32514 "2019-09-03T17:21:26Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [September 3, 2019, 9:33pm UTC](https://forum.katalon.com/t/how-to-resolve-encrypted-password-for-webservice-call/32514/5 "2019-09-03T21:33:14Z")

</div>

@Udaya

> [@Udaya](#):
>
> Do you have any solution for this? Any help would be really appreciated.

Obviously WebUI.setEncryptedPassword() does not work for API/Web Service testing.

> [@Udaya](#):
>
> We are forced to have credentials for some setup that has to be used in web as well as service call.  
> Its more work for us to go back and update the web test cases which has already completed.

I can sympathize with you but I suppose you need to do it.

If I were to do your job, I would take the following approach:

> [@Katalon.properties file and JVM System Property katalon.user.home](http://forum.katalon.com/t/katalon-properties-file-and-jvm-system-property-katalon-user-home/9943):
>
> Problems to solve Let me assume, I have a single Web Application in multiple environments: the development, the staging, the production-blue, the production-green and more. These environments have 99% same contents and features except the following differences: Hostname — e.g. [demoaut-mimic.kazurayam.com](http://demoaut-mimic.kazurayam.com/) for development, [demoaut.katalon.com](http://demoaut.katalon.com/) for production Username/Password — e.g. kazurayam/foobar for development, John Doe/ThisIsNotAPassword for production. Now I want to: I want to use [Kata…](https://www.katalon.com/)

1. make a properties file where you write the credentials, Or any JSON text file would do.
2. your test case (both for Web and for API/Web Service) reads the properties file, Your test case code should do everything to read the file (no KS built-in support).  
(But in Groovy, reading a JSON file is quite easy! see [The Apache Groovy programming language - Parsing and producing JSON](https://groovy-lang.org/json.html). )
3. git ignore the credentials file out of the source code repository

---

_[View the full topic](https://forum.katalon.com/t/how-to-resolve-encrypted-password-for-webservice-call/32514)._
