# OneSignal Send Push RPC Call Problem

**URL:** <https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765>\
**Category:** Local Setup\
**Created:** [May 27, 2020, 8:26pm UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765 "2020-05-27T20:26:32Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![stombee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/stombee/32/182_2.png) [@stombee](https://forum.heroiclabs.com/u/stombee)\
**Post date:** [May 27, 2020, 8:26pm UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/1 "2020-05-27T20:26:32Z")

</div>

Hi,

I have registered my App on OneSignal. I have added the OneSignal.lua and created pmessage.lua as suggested in the documents. Finally I have created a send\_push rpc call and feed it with the needed parameters as described in the documents. The client successfully registers itself to OneSignal and puts the OneSignal Id to the users metadata correctly with the key “os\_player\_id”. I tried to send a push notification from the OneSignal dashboard and it worked.

But when I call the RPC from the client as below I receive the following error but I couldn’t figured it out what is going on.

I would be grateful if you would help me with this issue.

Mustafa

1-) the error I receive

ApiResponseException: System.Collections.Generic.Dictionary2[System.String,System.Object] Nakama.HttpRequestAdapter+d\_\_6.MoveNext () (at \<99ab1ffd513a481fae6067e64cfa51b3\>:0) — End of stack trace from previous location where exception was thrown — System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at \<567df3e0919241ba98db88bec4c6696f\>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at \<567df3e0919241ba98db88bec4c6696f\>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at \<567df3e0919241ba98db88bec4c6696f\>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at \<567df3e0919241ba98db88bec4c6696f\>:0) System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () (at \<567df3e0919241ba98db88bec4c6696f\>:0)  
Nakama.ApiClient+d\_\_52.MoveNext () (at \<99ab1ffd513a481fae6067e64cfa51b3\>:0)  
…

2- ) Content of send\_push RPC call file I uploaded to Nakama:

local nk = require(“nakama”)  
local function send\_push(context, payload)  
local decoded = nk.json\_decode(payload)  
local user\_ids = decoded.user\_ids  
local player\_ids = {}  
local users = nk.users\_get\_id(user\_ids)  
for \_, u in ipairs(users)  
do  
table.insert(player\_ids, u.metadata.os\_player\_id)  
end  
local contents = decoded.contents  
local headings = decoded.headings

local included\_segments = nil  
local filters = nil  
local params = {}  
onesignal:create\_notification(contents, headings, included\_segments, filters, player\_ids, params)  
return payload  
end

nk.register\_rpc(send\_push, “send\_push”)  
3- The way I call the RPC Call from the client code.

```
    var payload = new Dictionary<string, object>
    {
        ["user_ids"] = new List<string>() { "22f9e1fd-fae3-46c7-ae92-f0935c9897f7" },
        ["contents"] = new Dictionary<string, string>() { { "en", "MessageExample" } },
        ["headings"] = new Dictionary<string, string>() { { "en", "TitleExample" } }
    };
    await client.RpcAsync(session, "send_push", payload.ToJson());
```

---

<div class="post-metadata">

**Author:** ![zyro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/zyro/32/14_2.png) [@zyro](https://forum.heroiclabs.com/u/zyro)\
**Post date:** [May 29, 2020, 3:25pm UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/2 "2020-05-29T15:25:52Z")

</div>

What version of the Nakama Unity client do you use? Any `ApiResponseException` should also contain a response code and detailed error message - can you share what these are?

---

<div class="post-metadata">

**Author:** ![stombee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/stombee/32/182_2.png) [@stombee](https://forum.heroiclabs.com/u/stombee)\
**Post date:** [May 30, 2020, 4:56pm UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/3 "2020-05-30T16:56:42Z")

</div>

Hi

The version of Nakama I use is 2.9.1+31694947

Th entire Exception is below. The part I sent before was the upmost part which repeats itself about where the calls are made following one another.

Thanks,

ApiResponseException: System.Collections.Generic.Dictionary`2[System.String,System.Object] Nakama.HttpRequestAdapter+<SendAsync>d__6.MoveNext () (at <99ab1ffd513a481fae6067e64cfa51b3>:0) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () (at \<567df3e0919241ba98db88bec4c6696f\>:0)  
Nakama.ApiClient+d\_\_52.MoveNext () (at \<99ab1ffd513a481fae6067e64cfa51b3\>:0)  
— End of stack trace from previous location where exception was thrown —  
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at \<567df3e0919241ba98db88bec4c6696f\>:0)  
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at \<567df3e0919241ba98db88bec4c6696f\>:0)  
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at \<567df3e0919241ba98db88bec4c6696f\>:0)  
System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at \<567df3e0919241ba98db88bec4c6696f\>:0)  
System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () (at \<567df3e0919241ba98db88bec4c6696f\>:0)  
NakamaClient+d\_\_44.MoveNext () (at Assets/Scripts/NakamaClient.cs:320)  
— End of stack trace from previous location where exception was thrown —  
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at \<567df3e0919241ba98db88bec4c6696f\>:0)  
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at \<567df3e0919241ba98db88bec4c6696f\>:0)  
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at \<567df3e0919241ba98db88bec4c6696f\>:0)  
System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at \<567df3e0919241ba98db88bec4c6696f\>:0)  
System.Runtime.CompilerServices.TaskAwaiter.GetResult () (at \<567df3e0919241ba98db88bec4c6696f\>:0)  
NakamaClient+d\_\_42.MoveNext () (at Assets/Scripts/NakamaClient.cs:252)  
— End of stack trace from previous location where exception was thrown —  
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at \<567df3e0919241ba98db88bec4c6696f\>:0)  
System.Runtime.CompilerServices.AsyncMethodBuilderCore+\<\>c.b\_\_6\_0 (System.Object state) (at \<567df3e0919241ba98db88bec4c6696f\>:0)  
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /Users/builduser/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:150)  
UnityEngine.UnitySynchronizationContext:ExecuteTasks() (at /Users/builduser/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:104)

---

<div class="post-metadata">

**Author:** ![zyro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/zyro/32/14_2.png) [@zyro](https://forum.heroiclabs.com/u/zyro)\
**Post date:** [May 30, 2020, 6:19pm UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/4 "2020-05-30T18:19:01Z")

</div>

> [@stombee](#):
>
> 2.9.1+31694947

This looks like a Nakama server version. I was asking about your Nakama Unity client library version, not server - can you clarify what version you’re using for this?

---

<div class="post-metadata">

**Author:** ![stombee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/stombee/32/182_2.png) [@stombee](https://forum.heroiclabs.com/u/stombee)\
**Post date:** [May 30, 2020, 6:48pm UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/5 "2020-05-30T18:48:52Z")

</div>

Sorry for that

The clients version is 2.3.1

---

<div class="post-metadata">

**Author:** ![zyro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/zyro/32/14_2.png) [@zyro](https://forum.heroiclabs.com/u/zyro)\
**Post date:** [May 30, 2020, 6:55pm UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/6 "2020-05-30T18:55:27Z")

</div>

Start by updating to [2.4.0](https://github.com/heroiclabs/nakama-unity/releases) and try it again. `ApiResponseException` also has a [`ToString` method](https://github.com/heroiclabs/nakama-dotnet/blob/bc576df23ba6f7adb169583dd795a287c31df0d2/codegen/main.go#L64) which is very helpful in getting more insight into the error - try printing that as well.

---

<div class="post-metadata">

**Author:** ![stombee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/stombee/32/182_2.png) [@stombee](https://forum.heroiclabs.com/u/stombee)\
**Post date:** [May 30, 2020, 7:57pm UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/7 "2020-05-30T19:57:17Z")

</div>

Updated to 2.4.0

Printed the exception in a try catch phrase and the exception is below.

ApiResponseException(StatusCode=500, Message='System.Collections.Generic.Dictionary`2[System.String,System.Object]', GrpcStatusCode=13) UnityEngine.Debug:Log(Object) <DenemeAsync2>d__44:MoveNext() (at Assets/Scripts/NakamaClient.cs:327) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetException(Exception)  
Nakama.d\_\_52:MoveNext()  
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetException(Exception)  
Nakama.d\_\_6:MoveNext()  
UnityEngine.UnitySynchronizationContext:ExecuteTasks() (at /Users/builduser/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:104)

---

<div class="post-metadata">

**Author:** ![zyro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/zyro/32/14_2.png) [@zyro](https://forum.heroiclabs.com/u/zyro)\
**Post date:** [May 30, 2020, 8:02pm UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/8 "2020-05-30T20:02:09Z")

</div>

OK so you get a 500 response from the server. Have you checked the server logs for error messages?

---

<div class="post-metadata">

**Author:** ![stombee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/stombee/32/182_2.png) [@stombee](https://forum.heroiclabs.com/u/stombee)\
**Post date:** [May 30, 2020, 8:46pm UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/9 "2020-05-30T20:46:26Z")

</div>

Interestingly this is how learned that I need to print the error details and heard about 500 response and that I need to check the server logs and be aware of such codes pointing about particular issues. Now I am looking for how to check the logs. I believe I can do that on my own.

I don’t know how to thank you @zyro for taking care of my beginner level questions. I voted and liked your answers if that’s a thing. Other than that, you now have a connection here in Ankara Turkey. If somehow you visit here be my guest.

Just noting my sincere feelings here. I am new in this development business, forums, GitHub and other related matters. And sorry if this is not the place to talk about these things. 😉 Please warn me so that I can delete this.

---

<div class="post-metadata">

**Author:** ![stombee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/stombee/32/182_2.png) [@stombee](https://forum.heroiclabs.com/u/stombee)\
**Post date:** [May 30, 2020, 9:00pm UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/10 "2020-05-30T21:00:49Z")

</div>

Below is the related error message from the server logs: the line 23 is: “onesignal:create\_notification(contents, headings, included\_segments, filters, player\_ids, params)”

I have already put the send\_push.lua up above. I tried to modify the code you have supplied in the documentation.

Thanks again.

{“level”:“error”,“ts”:“2020-05-30T20:52:50.665Z”,“msg”:“Runtime RPC function caused an error”,“id”:“send\_push”,“error”:"/nakama/data/modules/send\_push.lua:23: attempt to index a non-table object(nil)\nstack traceback:\n\t/nakama/data/modules/send\_push.lua:23: in main chunk\n\t[G]: ?",“stacktrace”:“[github.com/heroiclabs/nakama/v2/server.(\*RuntimeProviderLua](http://github.com/heroiclabs/nakama/v2/server.(*RuntimeProviderLua)).Rpc\n\[tgithub.com/heroiclabs/nakama/v2@/server/runtime\_lua.go:1037\ngithub.com/heroiclabs/nakama/v2/server.NewRuntimeProviderLua.func3.1\n\tgithub.com/heroiclabs/nakama/v2@/server/runtime\_lua.go:179\ngithub.com/heroiclabs/nakama/v2/server.(\*ApiServer](http://tgithub.com/heroiclabs/nakama/v2@/server/runtime_lua.go:1037%5Cngithub.com/heroiclabs/nakama/v2/server.NewRuntimeProviderLua.func3.1%5Cn%5Ctgithub.com/heroiclabs/nakama/v2@/server/runtime_lua.go:179%5Cngithub.com/heroiclabs/nakama/v2/server.(*ApiServer)).RpcFuncHttp\n\[tgithub.com/heroiclabs/nakama/v2@/server/api\_rpc.go:160\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2007\ngithub.com/gorilla/mux.(\*Router](http://tgithub.com/heroiclabs/nakama/v2@/server/api_rpc.go:160%5Cnnet/http.HandlerFunc.ServeHTTP%5Cn%5Ctnet/http/server.go:2007%5Cngithub.com/gorilla/mux.(*Router)).ServeHTTP\n\[tgithub.com/gorilla/mux@v1.7.3/mux.go:212\ngo.opencensus.io/plugin/ochttp.(\*Handler](http://tgithub.com/gorilla/mux@v1.7.3/mux.go:212%5Cngo.opencensus.io/plugin/ochttp.(*Handler)).ServeHTTP\n\[tgo.opencensus.io](http://tgo.opencensus.io)@v0.22.1/plugin/ochttp/server.go:86\[ngithub.com/heroiclabs/nakama/v2/server.decompressHandler.func1\n\tgithub.com/heroiclabs/nakama/v2@/server/api.go:461\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2007\ngithub.com/gorilla/handlers.CompressHandlerLevel.func1\n\tgithub.com/gorilla/handlers@v1.4.2/compress.go:148\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2007\ngithub.com/heroiclabs/nakama/v2/server.StartApiServer.func5\n\tgithub.com/heroiclabs/nakama/v2@/server/api.go:216\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2007\ngithub.com/heroiclabs/nakama/v2/server.StartApiServer.func6\n\tgithub.com/heroiclabs/nakama/v2@/server/api.go:227\nnet/http.HandlerFunc.ServeHTTP\n\tnet/http/server.go:2007\ngithub.com/gorilla/mux.(\*Router](http://ngithub.com/heroiclabs/nakama/v2/server.decompressHandler.func1%5Cn%5Ctgithub.com/heroiclabs/nakama/v2@/server/api.go:461%5Cnnet/http.HandlerFunc.ServeHTTP%5Cn%5Ctnet/http/server.go:2007%5Cngithub.com/gorilla/handlers.CompressHandlerLevel.func1%5Cn%5Ctgithub.com/gorilla/handlers@v1.4.2/compress.go:148%5Cnnet/http.HandlerFunc.ServeHTTP%5Cn%5Ctnet/http/server.go:2007%5Cngithub.com/heroiclabs/nakama/v2/server.StartApiServer.func5%5Cn%5Ctgithub.com/heroiclabs/nakama/v2@/server/api.go:216%5Cnnet/http.HandlerFunc.ServeHTTP%5Cn%5Ctnet/http/server.go:2007%5Cngithub.com/heroiclabs/nakama/v2/server.StartApiServer.func6%5Cn%5Ctgithub.com/heroiclabs/nakama/v2@/server/api.go:227%5Cnnet/http.HandlerFunc.ServeHTTP%5Cn%5Ctnet/http/server.go:2007%5Cngithub.com/gorilla/mux.(*Router)).ServeHTTP\n\[tgithub.com/gorilla/mux@v1.7.3/mux.go:212\ngithub.com/gorilla/handlers.(\*cors](http://tgithub.com/gorilla/mux@v1.7.3/mux.go:212%5Cngithub.com/gorilla/handlers.(*cors)).ServeHTTP\n\[tgithub.com/gorilla/handlers@v1.4.2/cors.go:54\nnet/http.serverHandler.ServeHTTP\n\tnet/http/server.go:2802\nnet/http.(\*conn](http://tgithub.com/gorilla/handlers@v1.4.2/cors.go:54%5Cnnet/http.serverHandler.ServeHTTP%5Cn%5Ctnet/http/server.go:2802%5Cnnet/http.(*conn)).serve\n\tnet/http/server.go:1890”}

---

<div class="post-metadata">

**Author:** ![zyro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/zyro/32/14_2.png) [@zyro](https://forum.heroiclabs.com/u/zyro)\
**Post date:** [June 3, 2020, 2:56pm UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/11 "2020-06-03T14:56:20Z")

</div>

@stombee Your problem is the call to `onesignal:create_notification`. The runtime doesn’t know what `onesignal` is. You need to either define it locally or import it from another module.

Do you have a `onesignal.lua` module you’ve also defined?

---

<div class="post-metadata">

**Author:** ![stombee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/stombee/32/182_2.png) [@stombee](https://forum.heroiclabs.com/u/stombee)\
**Post date:** [June 16, 2020, 8:23am UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/12 "2020-06-16T08:23:09Z")

</div>

Yes I have that onesignal.lua in the modules and also that pmessage.lua file that is mentioned in the docs.

---

<div class="post-metadata">

**Author:** ![novabyte](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/novabyte/32/1324_2.png) [@novabyte](https://forum.heroiclabs.com/u/novabyte)\
**Post date:** [June 16, 2020, 5:31pm UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/13 "2020-06-16T17:31:50Z")

</div>

@stombee I think there’s a typo in the `onesignal.lua` code with a solution covered in this forum post: [Onesignal module has wrong code](https://forum.heroiclabs.com/t/onesignal-module-has-wrong-code/711).

---

<div class="post-metadata">

**Author:** ![stombee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/stombee/32/182_2.png) [@stombee](https://forum.heroiclabs.com/u/stombee)\
**Post date:** [June 17, 2020, 7:52am UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/14 "2020-06-17T07:52:58Z")

</div>

I saw that post and fixed that typo already. I created a local onesignal object (that is already created in pmeesage.lua) in the send\_push function. I don’t know much about lua and I thought that pmessage.lua will be treated like a static instance.

I just put the entire content of the pmessage.lua into the calling function. I am sure there is a way to refrence the pmessage.lua but couldn’t figure it out. Now the code works but if you could show me the way how to do this properly I will be happy.

Thanks.

---

<div class="post-metadata">

**Author:** ![novabyte](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/novabyte/32/1324_2.png) [@novabyte](https://forum.heroiclabs.com/u/novabyte)\
**Post date:** [June 17, 2020, 8:55am UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/15 "2020-06-17T08:55:29Z")

</div>

@stombee I think at this point you’ll need to share your code snippets as a GitHub gist so that I can understand what needs to be done to improve it.

---

<div class="post-metadata">

**Author:** ![stombee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/stombee/32/182_2.png) [@stombee](https://forum.heroiclabs.com/u/stombee)\
**Post date:** [June 17, 2020, 12:42pm UTC](https://forum.heroiclabs.com/t/onesignal-send-push-rpc-call-problem/765/16 "2020-06-17T12:42:53Z")

</div>

Below is the working code for send\_push which sends a push notification to a certain user. In this code I explicitly defined the onesignal object locally in the function definition which is already in the pmessage.lua. I guess there is a way I can refrence pmessage.lua and not need to call the content of it locally in this function, but i dont know how.

```
> local nk = require("nakama")
> 
> local function send_push(context, payload)
> -- below three lines are the content of pmessage.lua
> local ONESIGNAL_API_KEY = "xxxxx"
> local ONESIGNAL_APP_ID = "yyyyy"
> local onesignal = require("onesignal").new(ONESIGNAL_API_KEY, ONESIGNAL_APP_ID)
> --
> 
> local decoded = nk.json_decode(payload)
> 
> local user_ids = decoded.user_ids
> local player_ids = {}
> local users = nk.users_get_id(user_ids)
> 
> for _, u in ipairs(users)
> do
> table.insert(player_ids, u.metadata.os_player_id)
> end
> 
> local contents = decoded.contents
> local headings = decoded.headings
> 
> 
> local included_segments = nil
> local filters = nil
> local params = {}
> onesignal:create_notification(contents, headings, included_segments, filters, player_ids, params)
> 
> return payload
> end
> 
> nk.register_rpc(send_push, "send_push")
```
