# Require example of logging in from a unity server to nakama

**URL:** <https://forum.heroiclabs.com/t/require-example-of-logging-in-from-a-unity-server-to-nakama/5651>\
**Category:** Client Libraries\
**Tags:** getting-started, authentication, sdk-unity\
**Created:** [September 18, 2024, 11:41am UTC](https://forum.heroiclabs.com/t/require-example-of-logging-in-from-a-unity-server-to-nakama/5651 "2024-09-18T11:41:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jell-o-fishi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/jell-o-fishi/32/2269_2.png) [@jell-o-fishi](https://forum.heroiclabs.com/u/jell-o-fishi)\
**Post date:** [September 18, 2024, 11:41am UTC](https://forum.heroiclabs.com/t/require-example-of-logging-in-from-a-unity-server-to-nakama/5651/1 "2024-09-18T11:41:01Z")

</div>

I manage to login from the unity client to nakama with AuthenticateDeviceAsync.  
Currently i am using the same authentication method from the server.  
The documentation states that server logins will not have a user ID, so i’m assuming there is a different method for logging into nakama from then unity server side.  
Cannot find examples or any actual documentation for this.  
Could somebody point me in the right direction of an example ?

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [September 18, 2024, 12:45pm UTC](https://forum.heroiclabs.com/t/require-example-of-logging-in-from-a-unity-server-to-nakama/5651/2 "2024-09-18T12:45:49Z")

</div>

Hello @jell-o-fishi, I think you’re looking for [server-to-server](https://heroiclabs.com/docs/nakama/server-framework/runtime-examples/#server-to-server) calls.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![jell-o-fishi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/jell-o-fishi/32/2269_2.png) [@jell-o-fishi](https://forum.heroiclabs.com/u/jell-o-fishi)\
**Post date:** [September 18, 2024, 3:43pm UTC](https://forum.heroiclabs.com/t/require-example-of-logging-in-from-a-unity-server-to-nakama/5651/3 "2024-09-18T15:43:50Z")

</div>

thanks.

I was more looking for a specific example with the unity-sdk.

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [September 18, 2024, 4:49pm UTC](https://forum.heroiclabs.com/t/require-example-of-logging-in-from-a-unity-server-to-nakama/5651/4 "2024-09-18T16:49:53Z")

</div>

The Nakama Unity SDK provides a function for S2S calls [here](https://github.com/heroiclabs/nakama-dotnet/blob/v3.13.0/Nakama/IClient.cs#L828).
