Skip to main content

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);


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));
}

Thanks a lot.


Reply