# APM Agent .NET Public API : how to configure apm server credential (username, password)

**URL:** <https://discuss.elastic.co/t/apm-agent-net-public-api-how-to-configure-apm-server-credential-username-password/244843>\
**Category:** Logstash\
**Created:** [August 13, 2020, 9:38am UTC](https://discuss.elastic.co/t/apm-agent-net-public-api-how-to-configure-apm-server-credential-username-password/244843 "2020-08-13T09:38:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![inhinyera16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inhinyera16/32/61625_2.png) [@inhinyera16](https://discuss.elastic.co/u/inhinyera16)\
**Post date:** [August 13, 2020, 9:38am UTC](https://discuss.elastic.co/t/apm-agent-net-public-api-how-to-configure-apm-server-credential-username-password/244843/1 "2020-08-13T09:38:00Z")

</div>

I have running apm .net agent in my local and i want to send apm data to my apm cloud service. But the cloud service requires username and password. How do i configure the api to handle authentication?

in my code, i used environment variables to specify serverurl

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 10, 2020, 9:38am UTC](https://discuss.elastic.co/t/apm-agent-net-public-api-how-to-configure-apm-server-credential-username-password/244843/2 "2020-09-10T09:38:30Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
