question

Lev Rakhman avatar image
Lev Rakhman asked Lev Rakhman commented

Create Glip Team Message

Hello, trying to find out how to create / post message in Glip using C# API.

Testing in sandbox (+16163285031). ClientID: WZMdfNElh7vc1Xv5k6NKDZ

Was able to create public team (ID 1928626182). But very unclear how to post a message to that team. The most I can see Create Note Request and Create Task Request. I tried to use create Note request, but nothing happened.

RestClient restClient = new RestClient(

_config.GetValue<string>("ClientID"),

_config.GetValue<string>("ClientSecret"),

_config.GetValue<string>("RingCentralServerURL"));

//Authenticate

await restClient.Authorize(_config.GetValue<string>("JWT"));

var bodyNote = new TMCreateNoteRequest { body = "AAA", title = "BBB" };

var resp2 = await restClient.TeamMessaging().V1().Chats("1928626182").Notes().Post(bodyNote);


rest api
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Phong Vu avatar image
Phong Vu answered Lev Rakhman commented

Here is the sample code to post a message to a chat

static private async Task post_team_message(String chatId)
{
    var bodyParams = new TMCreatePostRequest();
    bodyParams.text = "Send from C# app";
    var resp = await restClient.TeamMessaging().V1().Chats(chatId).Posts().Post(bodyParams);

    Console.WriteLine(JsonConvert.SerializeObject(resp));
}
1 comment
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Lev Rakhman avatar image Lev Rakhman commented ·

Thanks a lot.

0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys