Ashim Kumar
Ashim Kumar

Reputation: 35

Receiving SMS in C# with RingCentral

I am able to send SMS using C#. But my problem is I don't know to receive those SMS.

I looked into following documentation with WebHook and C# here:

https://developers.ringcentral.com/guide/notifications/quick-start/webhook/c-sharp

But not sure how to do it exactly.

Can I get any help to know how I can receive the SMS. Any sample will be great.

Upvotes: 0

Views: 285

Answers (1)

Anirban Sen Chowdhary
Anirban Sen Chowdhary

Reputation: 8311

There are 3 ways to receive SMS:

  • PubNub Subscription
  • WebHook Subscription
  • API Request

Here are some details:

  1. Using PubNub, you can receive SMS.
    Check it out here: https://github.com/ringcentral/ringcentral-csharp-client/blob/master/RingCentral.Test/SubscripotionTest.cs#L31
    Since this is used by PubNub, so you don't need ngrok

  2. If you want WebHook, you need to subscribe for push notification check the reference demo: https://github.com/ringcentral/ringcentral-csharp-client/blob/master/RingCentral.Test/WebHookTest.cs

  3. The direct API of RingCentral APIs to receive SMS content in your C#, by calling this API inside your SDK is: /restapi/v1.0/account/~/extension/~/message-store/{messageId}/content/{attachmentId}. Here you need to put the message id and the attachment id to retrieve message content from message-store

Hope this help.

Upvotes: 4

Related Questions