curl --request GET \
--url https://gate.whapi.cloud/contacts/ids/154662208577626%40lid \
--header 'accept: application/json' \
--header 'authorization: Bearer {your_token}'
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gate.whapi.cloud/contacts/ids/154662208577626%40lid",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept: application/json",
"authorization: Bearer {your_token}"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
import requests
url = "https://gate.whapi.cloud/contacts/ids/154662208577626%40lid"
headers = {
"accept": "application/json",
"authorization": "Bearer {your_token}"
}
response = requests.get(url, headers=headers)
print(response.text)
const url = 'https://gate.whapi.cloud/contacts/ids/154662208577626%40lid';
const response = await fetch(url, {
method: 'GET',
headers: {
accept: 'application/json',
authorization: 'Bearer {your_token}',
},
});
console.log(await response.text());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://gate.whapi.cloud/contacts/ids/154662208577626%40lid")
.get()
.addHeader("accept", "application/json")
.addHeader("authorization", "Bearer {your_token}")
.build();
Response response = client.newCall(request).execute();
using RestSharp;
var options = new RestClientOptions("https://gate.whapi.cloud/contacts/ids/154662208577626%40lid");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
request.AddHeader("Authorization", "Bearer {your_token}");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);