# Multi-requests HTTP Synthetic monitor with authentication

**URL:** <https://community.dynatrace.com/t/multi-requests-http-synthetic-monitor-with-authentication/42552>\
**Category:** Synthetic Monitoring\
**Tags:** http-monitor, synthetic-monitoring\
**Created:** [November 9, 2023, 10:40pm UTC](https://community.dynatrace.com/t/multi-requests-http-synthetic-monitor-with-authentication/42552 "2023-11-09T22:40:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![olegus](https://avatars.discourse-cdn.com/v4/letter/o/3d9bf3/32.png) [@olegus](https://community.dynatrace.com/u/olegus)\
**Post date:** [November 9, 2023, 10:40pm UTC](https://community.dynatrace.com/t/multi-requests-http-synthetic-monitor-with-authentication/42552/1 "2023-11-09T22:40:16Z")

</div>

We need to monitor an API with a following workflow-

1. Login - POST with body containing credentials and other auth data

2. API method call - GET

3. Logout - POST without a body

I can create chained HTTP requests but API uses cookie authentication and I cannot find a way to set a cookie header to consequent requests after successful login.

Is it possible at all to implement this scenario ?

Any hints appreciated,

Thanks

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [November 10, 2023, 9:30am UTC](https://community.dynatrace.com/t/multi-requests-http-synthetic-monitor-with-authentication/42552/2 "2023-11-10T09:30:12Z")

</div>

[@olegus](https://community.dynatrace.com/user/65794), You should be able to do it with Javascript. Some examples for insipration 😉

[https://community.dynatrace.com/t5/Troubleshooting/Sample-Post-Execution-script-JavaScript-Code-to-retrieve-the-Set/ta-p/209465](https://community.dynatrace.com/topic/209465)

[https://community.dynatrace.com/t5/Synthetic-Monitoring/Capture-cookie-value-in-synthetic-script-step-to-set-in/m-p/169904](https://community.dynatrace.com/post/169904)
