# How to authenticate via Token in Dynatrace

**URL:** <https://community.dynatrace.com/t/how-to-authenticate-via-token-in-dynatrace/32761>\
**Category:** Synthetic Monitoring\
**Tags:** synthetic-monitoring\
**Created:** [September 22, 2021, 4:52am UTC](https://community.dynatrace.com/t/how-to-authenticate-via-token-in-dynatrace/32761 "2021-09-22T04:52:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhamotharan](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dhamotharan](https://community.dynatrace.com/u/dhamotharan)\
**Post date:** [September 22, 2021, 4:52am UTC](https://community.dynatrace.com/t/how-to-authenticate-via-token-in-dynatrace/32761/1 "2021-09-22T04:52:10Z")

</div>

I need to monitor the web application .Our application authendicate via Vasco token or mobile OTP based on the criteria configured for the user id. Since this is dynamic how to acheive the authendication to get it done via dynatrace & need to do synthetic monitoring post to the login pages

---

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [September 22, 2021, 9:23am UTC](https://community.dynatrace.com/t/how-to-authenticate-via-token-in-dynatrace/32761/2 "2021-09-22T09:23:39Z")

</div>

Hi,

there is an example of how to do this&nbsp;[here](https://www.dynatrace.com/support/help/how-to-use-dynatrace/synthetic-monitoring/http-monitors/pre-and-post-scripting-for-http-monitors/#example-monitor-)&nbsp;. You will need to tweak it depending on how the token is sent in the response etc but the principal is the same. You need to make an HTTP request to get the token. Retrieve the token and store it so the next request can use it. Then in the next request use the stored token value.

Best wishes, Hannah

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [October 11, 2021, 7:54pm UTC](https://community.dynatrace.com/t/how-to-authenticate-via-token-in-dynatrace/32761/3 "2021-10-11T19:54:21Z")

</div>

I can confirm&nbsp;[@HannahM](https://community.dynatrace.com/user/1433)&nbsp;solution does works!! We are doing exactly this to get the OTP Token, using password vault to store the previous token and working well!!
