# Accessing Match State via RPC in Server-Authoritative

**URL:** <https://forum.heroiclabs.com/t/accessing-match-state-via-rpc-in-server-authoritative/5974>\
**Category:** Runtime Framework\
**Tags:** server-framework, golang\
**Created:** [January 25, 2025, 7:04am UTC](https://forum.heroiclabs.com/t/accessing-match-state-via-rpc-in-server-authoritative/5974 "2025-01-25T07:04:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![surajTLabs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/surajtlabs/32/1497_2.png) [@surajTLabs](https://forum.heroiclabs.com/u/surajTLabs)\
**Post date:** [January 25, 2025, 7:04am UTC](https://forum.heroiclabs.com/t/accessing-match-state-via-rpc-in-server-authoritative/5974/1 "2025-01-25T07:04:33Z")

</div>

Is it possible to use an RPC call to access the `state (interface{})` (read-only) of a server-authoritative match if the matchId is known? If yes, what would be the recommended approach to achieve this?

---

<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:** [January 27, 2025, 10:29am UTC](https://forum.heroiclabs.com/t/accessing-match-state-via-rpc-in-server-authoritative/5974/2 "2025-01-27T10:29:38Z")

</div>

Hello @surajTLabs,

Can you elaborate a bit on why you need to read the match state from an RPC?

---

<div class="post-metadata">

**Author:** ![surajTLabs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/surajtlabs/32/1497_2.png) [@surajTLabs](https://forum.heroiclabs.com/u/surajTLabs)\
**Post date:** [January 27, 2025, 6:20pm UTC](https://forum.heroiclabs.com/t/accessing-match-state-via-rpc-in-server-authoritative/5974/3 "2025-01-27T18:20:09Z")

</div>

I am trying to add bots with some third party sdk, which can access data at runtime from webhook only. But matchmaking and bot decision is implemented on Nakama side only. So via webhook RPC I can fetch assigned bot details using match id…

---

<div class="post-metadata">

**Author:** ![Eatos](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/eatos/32/1656_2.png) [@Eatos](https://forum.heroiclabs.com/u/Eatos)\
**Post date:** [January 27, 2025, 9:17pm UTC](https://forum.heroiclabs.com/t/accessing-match-state-via-rpc-in-server-authoritative/5974/4 "2025-01-27T21:17:02Z")

</div>

You could technically access it with:  
[nk.match\_get](https://heroiclabs.com/docs/nakama/server-framework/lua-runtime/function-reference/#match_get)

But only while match is active, and with combination of rpc it could work. This kind of approach i am using for reconnection process if user denies to reconnect to match for some reason, so he loses rewards and gets penality.
