This repository was archived by the owner on Feb 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
FreshdeskClient.GetContact Method
Jean-Sebastien Carle edited this page Jul 24, 2019
·
2 revisions
Retrieves a contact.
public (Response, Contact) GetContact(long contactID);| Name | Type | Description |
|---|---|---|
| contactID | Int64 | The ID of the contact to retrieve. |
This method is returned as a Tuple.
| Type | Description |
|---|---|
| Response | The server response that was returned by the request. |
| Contact | The requested contact. Is null if the contact was not retrieved. |
The following code example demonstrates this method.
using Freshdesk;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
string freshdeskDomain = "yourcompany.freshdesk.com";
string apiKey = "yourapikey";
FreshdeskClient freshdesk = new FreshdeskClient(freshdeskDomain, apiKey, "X");
(Response response, Contact contact) = freshdesk.GetContact(28000000000);
if (response.StatusCode == HttpStatusCode.OK)
Console.WriteLine(contact.Name);
}
}
}ℹ️ The Response StatusCode will return HttpStatusCode.OK if the contact was successfully retrieved.