Skip to content

Latest commit

 

History

History
52 lines (32 loc) · 2.4 KB

other-msg.md

File metadata and controls

52 lines (32 loc) · 2.4 KB

Other Messages

There are other kind of message types which are supported by the client. In the following paragraphs we will look how to send contacts, venues or locations.

Contact

send contact method send contacts tests

This is the code to send a contact. Mandatory are the parameters chatId, phoneNumber and firstName.

{{#include ../../../Examples/2/SendMessage.cs:send-contact}}

send contact

If you want to send a contact as vCard you can achieve this by adding a valid vCard string as value for the optional parameter vCard as seen in the given example below.

{{#include ../../../Examples/2/SendMessage.cs:send-vCard}}

send vcard

Venue

send venue method send venue tests

The code snippet below sends a venue with a title and a address as given parameters:

{{#include ../../../Examples/2/SendMessage.cs:send-venue}}

send contact

Location

send location method send location tests

The difference between sending a location and a venue is, that the venue requires a title and address. A location can be any given point as latitude and longitude.

The following snippet shows how to send a location with the mandatory parameters:

{{#include ../../../Examples/2/SendMessage.cs:send-location}}

send contact