Geliştiriciler için API Referansı v3

Başlarken

İsteklerin sistem tarafından işlenmesi için bir API anahtarı gereklidir. Bir kullanıcı kaydolduğunda, bu kullanıcı için otomatik olarak bir API anahtarı oluşturulur. API anahtarı her istekle birlikte gönderilmelidir (aşağıdaki tam örneğe bakın). API anahtarı gönderilmezse veya süresi dolmuşsa bir hata olacaktır. Kötüye kullanımı önlemek için lütfen API anahtarınızı gizli tuttuğunuzdan emin olun.

kimlik doğrulama

API sistemiyle kimlik doğrulaması yapmak için API anahtarınızı her istekle birlikte bir yetkilendirme belirteci olarak göndermeniz gerekir. Aşağıda örnek kodu görebilirsiniz.

curl --location --request POST 'https://www.e.vg/api/url/add' \ 
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \ 
$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/url/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOURAPIKEY",
    "Content-Type: application/json",
    ),
));

$response = curl_exec($curl);
Oran Sınırı

API'miz, kararlılığını en üst düzeye çıkarmak için isteklerdeki ani artışlara karşı koruma sağlayan bir hız sınırlayıcıya sahiptir. Hız sınırlayıcımız şu anda 1 dakika başına 3000 istekle sınırlandırılmıştır.

Yanıtla birlikte birkaç başlık gönderilir ve bunlar, istekle ilgili çeşitli bilgileri belirlemek için incelenebilir.

X-RateLimit-Limit: 3000
X-RateLimit-Remaining: 2999
X-RateLimit-Reset: TIMESTAMP
Yanıt İşleme

Tüm API yanıtı, varsayılan olarak JSON biçiminde döndürülür. Bunu kullanılabilir verilere dönüştürmek için dile göre uygun işlevin kullanılması gerekecektir. PHP'de, json_decode() işlevi, verileri bir nesneye (varsayılan) veya bir diziye (ikinci parametreyi true olarak ayarlayın) dönüştürmek için kullanılabilir. Hata anahtarının kontrol edilmesi bir hata olup olmadığı hakkında bilgi verdiği için çok önemlidir. Başlık kodunu da kontrol edebilirsiniz.

{
    "error": 1,
    "message": "An error ocurred"
}

Bağlantılar


Hesap

Hesap Al
GET https://www.e.vg/api/account

Hesapla ilgili bilgi almak için bu uç noktaya bir istek gönderebilirsiniz ve bu, hesapla ilgili verileri döndürür.

curl --location --request GET 'https://www.e.vg/api/account' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/account",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "data": {
        "id": 1,
        "email": "[email protected]",
        "username": "sampleuser",
        "avatar": "https:\/\/domain.com\/content\/avatar.png",
        "status": "pro",
        "expires": "2022-11-15 15:00:00",
        "registered": "2020-11-10 18:01:43"
    }
}
Hesabı güncelle
PUT https://www.e.vg/api/account/update

Hesapla ilgili bilgileri güncellemek için bu uç noktaya bir istek gönderebilirsiniz; bu, hesaptaki verileri güncelleyecektir.

curl --location --request PUT 'https://www.e.vg/api/account/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "[email protected]",
    "password": "newpassword"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/account/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => json_encode(array (
  'email' => '[email protected]',
  'password' => 'newpassword',
)),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "message": "Account has been successfully updated."
}

Kanallar

Kanalları Listele
GET https://www.e.vg/api/channels?limit=2&page=1

API aracılığıyla kanallarınızı almak için bu uç noktayı kullanabilirsiniz. Ayrıca verileri filtreleyebilirsiniz (Daha fazla bilgi için tabloya bakın).

Parametre Tanım
limit (isteğe bağlı) Sayfa başına veri sonucu
page (isteğe bağlı) Geçerli sayfa isteği
curl --location --request GET 'https://www.e.vg/api/channels?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/channels?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "channels": [
            {
                "id": 1,
                "name": "Channel 1",
                "description": "Description of channel 1",
                "color": "#000000",
                "starred": true
            },
            {
                "id": 2,
                "name": "Channel 2",
                "description": "Description of channel 2",
                "color": "#FF0000",
                "starred": false
            }
        ]
    }
}
Kanal Öğelerini Listeleme
GET https://www.e.vg/api/channel/:id?limit=1&page=1

API aracılığıyla belirli kanallardaki öğeleri almak için bu uç noktayı kullanabilirsiniz. Ayrıca verileri filtreleyebilirsiniz (Daha fazla bilgi için tabloya bakın).

Parametre Tanım
limit (isteğe bağlı) Sayfa başına veri sonucu
page (isteğe bağlı) Geçerli sayfa isteği
curl --location --request GET 'https://www.e.vg/api/channel/:id?limit=1&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/channel/:id?limit=1&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "items": [
            {
                "type": "links",
                "id": 1,
                "title": "My Sample Link",
                "preview": "https:\/\/google.com",
                "link": "https:\/\/www.e.vg\/google",
                "date": "2022-05-12"
            },
            {
                "type": "bio",
                "id": 1,
                "title": "My Sample Bio",
                "preview": "https:\/\/www.e.vg\/mybio",
                "link": "https:\/\/www.e.vg\/mybio",
                "date": "2022-06-01"
            }
        ]
    }
}
Kanal Oluştur
POST https://www.e.vg/api/channel/add

Bu uç nokta kullanılarak bir kanal eklenebilir.

Parametre Tanım
name (gerekli) Kanal adı
description (isteğe bağlı) Kanal açıklaması
color (isteğe bağlı) Kanal rozeti rengi (HEX)
starred (isteğe bağlı) Kanala yıldız ekleyin veya eklemeyin (doğru veya yanlış)
curl --location --request POST 'https://www.e.vg/api/channel/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/channel/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => json_encode(array (
  'name' => 'New Channel',
  'description' => 'my new channel',
  'color' => '#000000',
  'starred' => true,
)),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "id": 3,
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}
Bir Kanala Öğe Atama
POST https://www.e.vg/api/channel/:channelid/assign/:type/:itemid

Bir öğe, kanal kimliği, öğe türü (bağlantılar, bio veya qr) ve öğe kimliği ile bir istek göndererek herhangi bir kanala atanabilir.

Parametre Tanım
:channelid (gerekli) Kanal Kimliği
:type (gerekli) bağlantılar veya biyografi veya qr
:itemid (gerekli) Öğe Kimliği
curl --location --request POST 'https://www.e.vg/api/channel/:channelid/assign/:type/:itemid' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/channel/:channelid/assign/:type/:itemid",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "message": "Item successfully added to the channel."
}
Kanalı Güncelle
PUT https://www.e.vg/api/channel/:id/update

Bir kanalı güncellemek için, bir PUT isteği aracılığıyla JSON'da geçerli bir veri göndermeniz gerekir. Veriler, aşağıda gösterildiği gibi isteğinizin ham gövdesi olarak gönderilmelidir. Aşağıdaki örnek, gönderebileceğiniz tüm parametreleri gösterir, ancak hepsini göndermeniz gerekmez (Daha fazla bilgi için tabloya bakın).

Parametre Tanım
name (isteğe bağlı) Kanal adı
description (isteğe bağlı) Kanal açıklaması
color (isteğe bağlı) Kanal rozeti rengi (HEX)
starred (isteğe bağlı) Kanala yıldız ekleyin veya eklemeyin (doğru veya yanlış)
curl --location --request PUT 'https://www.e.vg/api/channel/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Acme Corp",
    "description": "channel for items for Acme Corp",
    "color": "#FFFFFF",
    "starred": false
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/channel/:id/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => json_encode(array (
  'name' => 'Acme Corp',
  'description' => 'channel for items for Acme Corp',
  'color' => '#FFFFFF',
  'starred' => false,
)),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "message": "Channel has been updated successfully."
}
Kanalı Sil
DELETE https://www.e.vg/api/channel/:id/delete

Bir kanalı silmek için bir DELETE isteği göndermeniz gerekir. Tüm öğeler de atanmayacak.

curl --location --request DELETE 'https://www.e.vg/api/channel/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/channel/:id/delete",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "message": "Channel has been deleted successfully."
}

Markalı Alan Adları

Markalı Etki Alanlarını Listeleme
GET https://www.e.vg/api/domains?limit=2&page=1

API aracılığıyla markalı alanlarınızı almak için bu uç noktayı kullanabilirsiniz. Ayrıca verileri filtreleyebilirsiniz (Daha fazla bilgi için tabloya bakın).

Parametre Tanım
limit (isteğe bağlı) Sayfa başına veri sonucu
page (isteğe bağlı) Geçerli sayfa isteği
curl --location --request GET 'https://www.e.vg/api/domains?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/domains?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "domains": [
            {
                "id": 1,
                "domain": "https:\/\/domain1.com",
                "redirectroot": "https:\/\/rootdomain.com",
                "redirect404": "https:\/\/rootdomain.com\/404"
            },
            {
                "id": 2,
                "domain": "https:\/\/domain2.com",
                "redirectroot": "https:\/\/rootdomain2.com",
                "redirect404": "https:\/\/rootdomain2.com\/404"
            }
        ]
    }
}
Markalı Etki Alanı Oluşturun
POST https://www.e.vg/api/domain/add

Bu uç nokta kullanılarak bir etki alanı eklenebilir. Lütfen alan adının sunucumuza doğru şekilde yönlendirildiğinden emin olun.

Parametre Tanım
domain (gerekli) http veya https dahil markalı alan adı
redirectroot (isteğe bağlı) Birisi alanınızı ziyaret ettiğinde kök yönlendirme
redirect404 (isteğe bağlı) Özel 404 yönlendirmesi
curl --location --request POST 'https://www.e.vg/api/domain/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "domain": "https:\/\/domain1.com",
    "redirectroot": "https:\/\/rootdomain.com",
    "redirect404": "https:\/\/rootdomain.com\/404"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/domain/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => json_encode(array (
  'domain' => 'https://domain1.com',
  'redirectroot' => 'https://rootdomain.com',
  'redirect404' => 'https://rootdomain.com/404',
)),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "id": 1
}
Alan Adını Güncelle
PUT https://www.e.vg/api/domain/:id/update

Markalı bir alanı güncellemek için bir PUT isteği aracılığıyla JSON'da geçerli bir veri göndermeniz gerekir. Veriler, aşağıda gösterildiği gibi isteğinizin ham gövdesi olarak gönderilmelidir. Aşağıdaki örnek, gönderebileceğiniz tüm parametreleri gösterir, ancak hepsini göndermeniz gerekmez (Daha fazla bilgi için tabloya bakın).

Parametre Tanım
redirectroot (isteğe bağlı) Birisi alanınızı ziyaret ettiğinde kök yönlendirme
redirect404 (isteğe bağlı) Özel 404 yönlendirmesi
curl --location --request PUT 'https://www.e.vg/api/domain/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "redirectroot": "https:\/\/rootdomain-new.com",
    "redirect404": "https:\/\/rootdomain-new.com\/404"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/domain/:id/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => json_encode(array (
  'redirectroot' => 'https://rootdomain-new.com',
  'redirect404' => 'https://rootdomain-new.com/404',
)),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "message": "Domain has been updated successfully."
}
Etki Alanı Sil
DELETE https://www.e.vg/api/domain/:id/delete

Bir alanı silmek için bir DELETE isteği göndermeniz gerekir.

curl --location --request DELETE 'https://www.e.vg/api/domain/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/domain/:id/delete",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "message": "Domain has been deleted successfully."
}

QR Kodları

QR kodlarını listele
GET https://www.e.vg/api/qr?limit=2&page=1

API üzerinden QR kodlarınızı almak için bu uç noktayı kullanabilirsiniz. Ayrıca verileri filtreleyebilirsiniz (Daha fazla bilgi için tabloya bakın).

Parametre Tanım
limit (isteğe bağlı) Sayfa başına veri sonucu
page (isteğe bağlı) Geçerli sayfa isteği
curl --location --request GET 'https://www.e.vg/api/qr?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/qr?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "qrs": [
            {
                "id": 2,
                "link": "https:\/\/www.e.vg\/qr\/a2d5e",
                "scans": 0,
                "name": "Google",
                "date": "2020-11-10 18:01:43"
            },
            {
                "id": 1,
                "link": "https:\/\/www.e.vg\/qr\/b9edfe",
                "scans": 5,
                "name": "Google Canada",
                "date": "2020-11-10 18:00:25"
            }
        ]
    }
}
Tek bir QR Kodu alın
GET https://www.e.vg/api/qr/:id

API aracılığıyla tek bir QR kodunun ayrıntılarını almak için bu uç noktayı kullanabilirsiniz.

curl --location --request GET 'https://www.e.vg/api/qr/:id' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/qr/:id",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "details": {
        "id": 1,
        "link": "https:\/\/www.e.vg\/qr\/b9edfe",
        "scans": 5,
        "name": "Google Canada",
        "date": "2020-11-10 18:00:25"
    },
    "data": {
        "clicks": 1,
        "uniqueClicks": 1,
        "topCountries": {
            "Unknown": "1"
        },
        "topReferrers": {
            "Direct, email and other": "1"
        },
        "topBrowsers": {
            "Chrome": "1"
        },
        "topOs": {
            "Windows 10": "1"
        },
        "socialCount": {
            "facebook": 0,
            "twitter": 0,
            "instagram": 0
        }
    }
}
QR Kodu Oluşturun
POST https://www.e.vg/api/qr/add

Bir QR Kodu oluşturmak için, bir POST isteği aracılığıyla JSON'da geçerli bir veri göndermeniz gerekir. Veriler, aşağıda gösterildiği gibi isteğinizin ham gövdesi olarak gönderilmelidir. Aşağıdaki örnek, gönderebileceğiniz tüm parametreleri gösterir, ancak hepsini göndermeniz gerekmez (Daha fazla bilgi için tabloya bakın).

Parametre Tanım
type (gerekli) metin | ekran kartı | bağlantı | e-posta | telefon | sms | kablosuz internet
data (gerekli) QR kodunun içine gömülecek veriler. Veri, türüne bağlı olarak dize veya dizi olabilir
background (isteğe bağlı) RGB rengi ör. rgb(255,255,255)
foreground (isteğe bağlı) RGB rengi ör. rgb(0,0,0)
logo (isteğe bağlı) Logonun png veya jpg yolu
curl --location --request POST 'https://www.e.vg/api/qr/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/qr/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => json_encode(array (
  'type' => 'link',
  'data' => 'https://google.com',
  'background' => 'rgb(255,255,255)',
  'foreground' => 'rgb(0,0,0)',
  'logo' => 'https://site.com/logo.png',
)),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "id": 3,
    "link": "https:\/\/www.e.vg\/qr\/a58f79"
}
QR Kodunu Güncelle
PUT https://www.e.vg/api/qr/:id/update

Bir QR Kodunu güncellemek için, bir PUT isteği aracılığıyla JSON'da geçerli bir veri göndermeniz gerekir. Veriler, aşağıda gösterildiği gibi isteğinizin ham gövdesi olarak gönderilmelidir. Aşağıdaki örnek, gönderebileceğiniz tüm parametreleri gösterir, ancak hepsini göndermeniz gerekmez (Daha fazla bilgi için tabloya bakın).

Parametre Tanım
data (gerekli) QR kodunun içine gömülecek veriler. Veri, türüne bağlı olarak dize veya dizi olabilir
background (isteğe bağlı) RGB rengi ör. rgb(255,255,255)
foreground (isteğe bağlı) RGB rengi ör. rgb(0,0,0)
logo (isteğe bağlı) Logonun png veya jpg yolu
curl --location --request PUT 'https://www.e.vg/api/qr/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/qr/:id/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => json_encode(array (
  'type' => 'link',
  'data' => 'https://google.com',
  'background' => 'rgb(255,255,255)',
  'foreground' => 'rgb(0,0,0)',
  'logo' => 'https://site.com/logo.png',
)),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "message": "QR has been updated successfully."
}
QR Kodunu Sil
DELETE https://www.e.vg/api/qr/:id/delete

Bir QR kodunu silmek için bir DELETE isteği göndermeniz gerekir.

curl --location --request DELETE 'https://www.e.vg/api/qr/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/qr/:id/delete",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "message": "QR Code has been deleted successfully."
}

kampanyalar

Kampanyaları Listele
GET https://www.e.vg/api/campaigns?limit=2&page=1

Kampanyalarınızı API üzerinden almak için bu uç noktayı kullanabilirsiniz. Ayrıca verileri filtreleyebilirsiniz (Daha fazla bilgi için tabloya bakın).

Parametre Tanım
limit (isteğe bağlı) Sayfa başına veri sonucu
page (isteğe bağlı) Geçerli sayfa isteği
curl --location --request GET 'https://www.e.vg/api/campaigns?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/campaigns?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "campaigns": [
            {
                "id": 1,
                "name": "Sample Campaign",
                "public": false,
                "rotator": false,
                "list": "https:\/\/domain.com\/u\/admin\/list-1"
            },
            {
                "id": 2,
                "domain": "Facebook Campaign",
                "public": true,
                "rotator": "https:\/\/domain.com\/r\/test",
                "list": "https:\/\/domain.com\/u\/admin\/test-2"
            }
        ]
    }
}
Kampanya Oluştur
POST https://www.e.vg/api/campaign/add

Bu uç nokta kullanılarak bir kampanya eklenebilir.

Parametre Tanım
name (isteğe bağlı) Kampanya adı
slug (isteğe bağlı) Rotator Slug
public (isteğe bağlı) Erişim
curl --location --request POST 'https://www.e.vg/api/campaign/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "New Campaign",
    "slug": "new-campaign",
    "public": true
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/campaign/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => json_encode(array (
  'name' => 'New Campaign',
  'slug' => 'new-campaign',
  'public' => true,
)),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "id": 3,
    "domain": "New Campaign",
    "public": true,
    "rotator": "https:\/\/domain.com\/r\/new-campaign",
    "list": "https:\/\/domain.com\/u\/admin\/new-campaign-3"
}
Bir Kampanyaya Bağlantı Atama
POST https://www.e.vg/api/campaign/:campaignid/assign/:linkid

Bu uç nokta kullanılarak bir kampanyaya kısa bir bağlantı atanabilir. Uç nokta, kampanya kimliğini ve kısa bağlantı kimliğini gerektirir.

curl --location --request POST 'https://www.e.vg/api/campaign/:campaignid/assign/:linkid' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/campaign/:campaignid/assign/:linkid",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "message": "Link successfully added to the campaign."
}
Kampanyayı Güncelle
PUT https://www.e.vg/api/campaign/:id/update

Bir kampanyayı güncellemek için, bir PUT isteği aracılığıyla JSON'da geçerli bir veri göndermeniz gerekir. Veriler, aşağıda gösterildiği gibi isteğinizin ham gövdesi olarak gönderilmelidir. Aşağıdaki örnek, gönderebileceğiniz tüm parametreleri gösterir, ancak hepsini göndermeniz gerekmez (Daha fazla bilgi için tabloya bakın).

Parametre Tanım
name (gerekli) Kampanya adı
slug (isteğe bağlı) Rotator Slug
public (isteğe bağlı) Erişim
curl --location --request PUT 'https://www.e.vg/api/campaign/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Twitter Campaign",
    "slug": "twitter-campaign",
    "public": true
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/campaign/:id/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => json_encode(array (
  'name' => 'Twitter Campaign',
  'slug' => 'twitter-campaign',
  'public' => true,
)),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "id": 3,
    "domain": "Twitter Campaign",
    "public": true,
    "rotator": "https:\/\/domain.com\/r\/twitter-campaign",
    "list": "https:\/\/domain.com\/u\/admin\/twitter-campaign-3"
}
Kampanyayı Sil
DELETE https://www.e.vg/api/campaign/:id/delete

Bir kampanyayı silmek için bir DELETE isteği göndermeniz gerekir.

curl --location --request DELETE 'https://www.e.vg/api/campaign/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/campaign/:id/delete",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "message": "Campaign has been deleted successfully."
}

piksel

Pikselleri Listele
GET https://www.e.vg/api/pixels?limit=2&page=1

API aracılığıyla piksel kodlarınızı almak için bu uç noktayı kullanabilirsiniz. Ayrıca verileri filtreleyebilirsiniz (Daha fazla bilgi için tabloya bakın).

Parametre Tanım
limit (isteğe bağlı) Sayfa başına veri sonucu
page (isteğe bağlı) Geçerli sayfa isteği
curl --location --request GET 'https://www.e.vg/api/pixels?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/pixels?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "pixels": [
            {
                "id": 1,
                "type": "gtmpixel",
                "name": "GTM Pixel",
                "tag": "GA-123456789",
                "date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "type": "twitterpixel",
                "name": "Twitter Pixel",
                "tag": "1234567",
                "date": "2020-11-10 18:10:00"
            }
        ]
    }
}
Piksel Oluştur
POST https://www.e.vg/api/pixel/add

Bu uç nokta kullanılarak bir piksel oluşturulabilir. Piksel türünü ve etiketi göndermeniz gerekir.

Parametre Tanım
type (required) gtmpixel | gapixel | fbpixel | adwordspixel | linkedinpixel | twitterpixel | adrollpixel | quorapixel | pinterest | bing | snapchat | reddit | tiktok
name (gerekli) Pikseliniz için özel ad
tag (gerekli) Piksel etiketi
curl --location --request POST 'https://www.e.vg/api/pixel/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "gtmpixel",
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/pixel/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => json_encode(array (
  'type' => 'gtmpixel',
  'name' => 'My GTM',
  'tag' => 'GTM-ABCDE',
)),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "id": 1
}
Pixel'i Güncelle
PUT https://www.e.vg/api/pixel/:id/update

Bir pikseli güncellemek için, bir PUT isteği aracılığıyla JSON'da geçerli bir veri göndermeniz gerekir. Veriler, aşağıda gösterildiği gibi isteğinizin ham gövdesi olarak gönderilmelidir. Aşağıdaki örnek, gönderebileceğiniz tüm parametreleri gösterir, ancak hepsini göndermeniz gerekmez (Daha fazla bilgi için tabloya bakın).

Parametre Tanım
name (isteğe bağlı) Pikseliniz için özel ad
tag (gerekli) Piksel etiketi
curl --location --request PUT 'https://www.e.vg/api/pixel/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/pixel/:id/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => json_encode(array (
  'name' => 'My GTM',
  'tag' => 'GTM-ABCDE',
)),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "message": "Pixel has been updated successfully."
}
Piksel Sil
DELETE https://www.e.vg/api/pixel/:id/delete

Bir pikseli silmek için bir DELETE isteği göndermeniz gerekir.

curl --location --request DELETE 'https://www.e.vg/api/pixel/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/pixel/:id/delete",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "message": "Pixel has been deleted successfully."
}

Özel Sıçrama

Özel Sıçrama Listeleme
GET https://www.e.vg/api/splash?limit=2&page=1

API aracılığıyla özel açılış sayfaları almak için bu uç noktayı kullanabilirsiniz. Ayrıca verileri filtreleyebilirsiniz (Daha fazla bilgi için tabloya bakın).

Parametre Tanım
limit (isteğe bağlı) Sayfa başına veri sonucu
page (isteğe bağlı) Geçerli sayfa isteği
curl --location --request GET 'https://www.e.vg/api/splash?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/splash?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "splash": [
            {
                "id": 1,
                "name": "Product 1 Promo",
                "date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "name": "Product 2 Promo",
                "date": "2020-11-10 18:10:00"
            }
        ]
    }
}

CTA Yer Paylaşımları

CTA Yer Paylaşımlarını Listeleme
GET https://www.e.vg/api/overlay?limit=2&page=1

API aracılığıyla cta bindirmeleri almak için bu uç noktayı kullanabilirsiniz. Ayrıca verileri filtreleyebilirsiniz (Daha fazla bilgi için tabloya bakın).

Parametre Tanım
limit (isteğe bağlı) Sayfa başına veri sonucu
page (isteğe bağlı) Geçerli sayfa isteği
curl --location --request GET 'https://www.e.vg/api/overlay?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/overlay?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "cta": [
            {
                "id": 1,
                "type": "message",
                "name": "Product 1 Promo",
                "date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "type": "contact",
                "name": "Contact Page",
                "date": "2020-11-10 18:10:00"
            }
        ]
    }
}

Kullanıcılar

Bu uç noktaya yalnızca yönetici ayrıcalıklarına sahip kullanıcılar erişebilir.

Kullanıcıları Listele
GET https://www.e.vg/api/users?filter=free

Platformdaki tüm kullanıcıların bir listesini alın. Veriler, url'de bir filtre parametresi gönderilerek filtrelenebilir.

Parametre Tanım
filter yönetici | ücretsiz | profesyonel
email Bir kullanıcıyı e-posta ile arayın
curl --location --request GET 'https://www.e.vg/api/users?filter=free' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/users?filter=free",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "data": [
        {
            "id": 2,
            "email": "[email protected]",
            "username": "sample2user",
            "avatar": "https:\\\/\\\/domain.com\/content\/avatar2.png",
            "status": "free",
            "planid": 1,
            "expires": null,
            "registered": "2020-11-10 18:01:43",
            "apikey": "ABC123DEF456"
        },
        {
            "id": 1,
            "email": "[email protected]",
            "username": "sampleuser",
            "avatar": "https:\\\/\\\/domain.com\/content\/avatar.png",
            "status": "pro",
            "planid": 2,
            "expires": "2022-11-15 15:00:00",
            "registered": "2020-11-10 18:01:43",
            "apikey": "ABC123DEF456"
        }
    ]
}
Tek Bir Kullanıcı Listele
GET https://www.e.vg/api/user/:id

Tek bir kullanıcı için veri alın.

curl --location --request GET 'https://www.e.vg/api/user/:id' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/user/:id",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "data": {
        "id": 2,
        "email": "[email protected]",
        "username": "sample2user",
        "avatar": "https:\\\/\\\/domain.com\/content\/avatar2.png",
        "status": "free",
        "planid": 1,
        "expires": null,
        "registered": "2020-11-10 18:01:43",
        "apikey": "ABC123DEF456"
    }
}
Kullanıcı oluştur
POST https://www.e.vg/api/user/add

Bir kullanıcı oluşturmak için bu uç noktayı kullanın ve aşağıdaki bilgileri JSON olarak gönderin.

Parametre Tanım
username (gerekli) Kullanıcının kullanıcı adı. Geçerli olması gerekiyor.
email (gerekli) Kullanıcının e-posta adresi. Geçerli olması gerekiyor.
password (gerekli) Kullanıcı şifresi. En az 5 karakter.
planid (isteğe bağlı) Premium plan. Bu, yönetici panelinde bulunabilir.
expiration (isteğe bağlı) Üyelik sona erme örneği 2020-12-26 12:00:00
curl --location --request POST 'https://www.e.vg/api/user/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "user",
    "password": "1234567891011",
    "email": "[email protected]",
    "planid": 1,
    "expiration": "2020-11-20 11:00:00"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/user/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => json_encode(array (
  'username' => 'user',
  'password' => '1234567891011',
  'email' => '[email protected]',
  'planid' => 1,
  'expiration' => '2020-11-20 11:00:00',
)),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "message": "User has been registered.",
    "data": {
        "id": 3,
        "email": "[email protected]",
        "username": "user"
    }
}
Kullanıcıyı sil
DELETE https://www.e.vg/api/user/:id/delete

Bir kullanıcıyı silmek için bu uç noktayı kullanın.

curl --location --request DELETE 'https://www.e.vg/api/user/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/user/:id/delete",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "message": "User has been deleted."
}
Kullanıcı Girişi
GET https://www.e.vg/api/user/login/:id

Bu uç nokta, kullanıcının platforma otomatik olarak giriş yapmasını sağlayacak benzersiz bir bağlantı oluşturacaktır. SSO giriş url'leri 1 saat geçerlidir ve tek seferlik kullanılabilir.

curl --location --request GET 'https://www.e.vg/api/user/login/:id' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/user/login/:id",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "url": "https:\/\/www.e.vg\/user\/login\/sso\/frrqclxrsftilbcgwbhpzgfilotwavlx"
}

Planlar

Bu uç noktaya yalnızca yönetici ayrıcalıklarına sahip kullanıcılar erişebilir.

Planları Listele
GET https://www.e.vg/api/plans

Platformdaki tüm planların bir listesini alın.

curl --location --request GET 'https://www.e.vg/api/plans' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/plans",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "data": [
        {
            "id": 2,
            "name": "Business",
            "free": false,
            "prices": {
                "monthly": 9.99,
                "yearly": 99.99,
                "lifetime": 999.99
            },
            "limits": {
                "links": 100,
                "clicks": 100000,
                "retention": 60,
                "custom": {
                    "enabled": "0"
                },
                "team": {
                    "enabled": "0",
                    "count": "0"
                },
                "splash": {
                    "enabled": "1",
                    "count": "5"
                },
                "overlay": {
                    "enabled": "1",
                    "count": "10"
                },
                "pixels": {
                    "enabled": "1",
                    "count": "10"
                },
                "domain": {
                    "enabled": "1",
                    "count": "1"
                },
                "multiple": {
                    "enabled": "0"
                },
                "alias": {
                    "enabled": "1"
                },
                "device": {
                    "enabled": "0"
                },
                "geo": {
                    "enabled": "0"
                },
                "bundle": {
                    "enabled": "0"
                },
                "parameters": {
                    "enabled": "0"
                },
                "export": {
                    "enabled": "0"
                },
                "api": {
                    "enabled": "0"
                }
            }
        },
        {
            "id": 1,
            "name": "Starter",
            "free": true,
            "prices": null,
            "limits": {
                "links": 10,
                "clicks": 1000,
                "retention": 7,
                "custom": {
                    "enabled": "0"
                },
                "team": {
                    "enabled": "0",
                    "count": "0"
                },
                "splash": {
                    "enabled": "0",
                    "count": "0"
                },
                "overlay": {
                    "enabled": "0",
                    "count": "10"
                },
                "pixels": {
                    "enabled": "0",
                    "count": "10"
                },
                "domain": {
                    "enabled": "0",
                    "count": "0"
                },
                "multiple": {
                    "enabled": "0"
                },
                "alias": {
                    "enabled": "0"
                },
                "device": {
                    "enabled": "0"
                },
                "geo": {
                    "enabled": "0"
                },
                "bundle": {
                    "enabled": "0"
                },
                "parameters": {
                    "enabled": "0"
                },
                "export": {
                    "enabled": "0"
                },
                "api": {
                    "enabled": "0"
                }
            }
        }
    ]
}
Bir Kullanıcıyı Plana Abone Olun
PUT https://www.e.vg/api/plan/:planid/user/:userid

Bir kullanıcıyı plana abone olmak için bu uç noktaya plan kimliği ve kullanıcı kimliği ile bir PUT isteği gönderin. Abonelik türü ve sona erme tarihi belirtilmelidir. Son kullanma tarihi belirtilmemişse, türe göre tarih ayarlanacaktır.

Parametre Tanım
type aylık | yıllık | ömür
expiration (isteğe bağlı) Planın sona erme tarihi ör.2024-05-19 19:47:13
curl --location --request PUT 'https://www.e.vg/api/plan/:planid/user/:userid' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "monthly",
    "expiration": "2024-05-19 19:47:13"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://www.e.vg/api/plan/:planid/user/:userid",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => json_encode(array (
  'type' => 'monthly',
  'expiration' => '2024-05-19 19:47:13',
)),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Sunucu cevabı
{
    "error": 0,
    "message": "User has been subscribed to this plan."
}