개발자를 위한 API 참조 v3

시작하기

시스템에서 요청을 처리하려면 API 키가 필요합니다. 사용자가 등록하면 이 사용자에 대한 API 키가 자동으로 생성됩니다. API 키는 각 요청과 함께 전송되어야 합니다(아래 전체 예 참조). API 키가 전송되지 않거나 만료되면 오류가 발생합니다. 남용을 방지하기 위해 API 키를 비밀로 유지하십시오.

입증

API 시스템으로 인증하려면 각 요청과 함께 API 키를 인증 토큰으로 보내야 합니다. 아래에서 샘플 코드를 볼 수 있습니다.

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);
속도 제한

API에는 안정성을 최대화하기 위해 급증하는 요청으로부터 보호하는 속도 제한기가 있습니다. 속도 제한기는 현재 1분당 3000개의 요청으로 제한됩니다.

여러 헤더가 응답과 함께 전송되며 이러한 헤더를 검사하여 요청에 대한 다양한 정보를 확인할 수 있습니다.

X-RateLimit-Limit: 3000
X-RateLimit-Remaining: 2999
X-RateLimit-Reset: TIMESTAMP
응답 처리

모든 API 응답은 기본적으로 JSON 형식으로 반환됩니다. 이를 사용 가능한 데이터로 변환하려면 언어에 따라 적절한 기능을 사용해야 합니다. PHP에서 json_decode() 함수를 사용하여 데이터를 객체(기본값) 또는 배열(두 번째 매개변수를 true로 설정)로 변환할 수 있습니다. 오류가 있는지 없는지에 대한 정보를 제공하는 오류 키를 확인하는 것은 매우 중요합니다. 헤더 코드도 확인할 수 있습니다.

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

QR 코드

QR 코드 나열
GET https://www.e.vg/api/qr?limit=2&page=1

API를 통해 QR 코드를 얻으려면 이 끝점을 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

매개변수 설명
limit (선택사항) 페이지별 데이터 결과
page (선택 사항) 현재 페이지 요청
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;
서버 응답
{
    "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"
            }
        ]
    }
}
단일 QR 코드 받기
GET https://www.e.vg/api/qr/:id

API를 통해 단일 QR 코드에 대한 세부 정보를 얻으려면 이 끝점을 사용할 수 있습니다.

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;
서버 응답
{
    "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 코드 만들기
POST https://www.e.vg/api/qr/add

QR 코드를 생성하려면 POST 요청을 통해 유효한 데이터를 JSON으로 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예는 보낼 수 있는 모든 매개변수를 보여주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

매개변수 설명
type (필수) 텍스트 | 카드 | 링크 | 이메일 | 전화 | SMS | 와이파이
data (필수) QR코드에 삽입할 데이터. 데이터는 유형에 따라 문자열 또는 배열일 수 있습니다.
background (선택 사항) RGB 색상 예. RGB(255,255,255)
foreground (선택 사항) RGB 색상 예. RGB(0,0,0)
logo (선택 사항) png 또는 jpg 로고 경로
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;
서버 응답
{
    "error": 0,
    "id": 3,
    "link": "https:\/\/www.e.vg\/qr\/a58f79"
}
QR 코드 업데이트
PUT https://www.e.vg/api/qr/:id/update

QR 코드를 업데이트하려면 PUT 요청을 통해 유효한 JSON 데이터를 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예는 보낼 수 있는 모든 매개변수를 보여주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

매개변수 설명
data (필수) QR코드에 삽입할 데이터. 데이터는 유형에 따라 문자열 또는 배열일 수 있습니다.
background (선택 사항) RGB 색상 예. RGB(255,255,255)
foreground (선택 사항) RGB 색상 예. RGB(0,0,0)
logo (선택 사항) png 또는 jpg 로고 경로
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;
서버 응답
{
    "error": 0,
    "message": "QR has been updated successfully."
}
QR 코드 삭제
DELETE https://www.e.vg/api/qr/:id/delete

QR 코드를 삭제하려면 DELETE 요청을 보내야 합니다.

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;
서버 응답
{
    "error": 0,
    "message": "QR Code has been deleted successfully."
}

계정

계정 가져오기
GET https://www.e.vg/api/account

계정에 대한 정보를 얻으려면 이 끝점에 요청을 보내면 계정에 대한 데이터가 반환됩니다.

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;
서버 응답
{
    "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"
    }
}
계정 업데이트
PUT https://www.e.vg/api/account/update

계정에 대한 정보를 업데이트하려면 이 끝점에 요청을 보내면 계정의 데이터가 업데이트됩니다.

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;
서버 응답
{
    "error": 0,
    "message": "Account has been successfully updated."
}

브랜드 도메인

브랜드 도메인 나열
GET https://www.e.vg/api/domains?limit=2&page=1

API를 통해 브랜드 도메인을 가져오려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

매개변수 설명
limit (선택사항) 페이지별 데이터 결과
page (선택 사항) 현재 페이지 요청
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;
서버 응답
{
    "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"
            }
        ]
    }
}
브랜드 도메인 만들기
POST https://www.e.vg/api/domain/add

이 끝점을 사용하여 도메인을 추가할 수 있습니다. 도메인이 우리 서버를 올바르게 가리키고 있는지 확인하십시오.

매개변수 설명
domain (필수) http 또는 https를 포함한 브랜드 도메인
redirectroot (선택 사항) 누군가가 귀하의 도메인을 방문할 때 루트 리디렉션
redirect404 (선택 사항) 사용자 지정 404 리디렉션
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;
서버 응답
{
    "error": 0,
    "id": 1
}
도메인 업데이트
PUT https://www.e.vg/api/domain/:id/update

브랜드 도메인을 업데이트하려면 PUT 요청을 통해 유효한 데이터를 JSON으로 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예는 보낼 수 있는 모든 매개변수를 보여주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

매개변수 설명
redirectroot (선택 사항) 누군가가 귀하의 도메인을 방문할 때 루트 리디렉션
redirect404 (선택 사항) 사용자 지정 404 리디렉션
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;
서버 응답
{
    "error": 0,
    "message": "Domain has been updated successfully."
}
도메인 삭제
DELETE https://www.e.vg/api/domain/:id/delete

도메인을 삭제하려면 DELETE 요청을 보내야 합니다.

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;
서버 응답
{
    "error": 0,
    "message": "Domain has been deleted successfully."
}

연결


채널

채널 나열
GET https://www.e.vg/api/channels?limit=2&page=1

API를 통해 채널을 가져오려면 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

매개변수 설명
limit (선택사항) 페이지별 데이터 결과
page (선택 사항) 현재 페이지 요청
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;
서버 응답
{
    "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
            }
        ]
    }
}
채널 항목 나열
GET https://www.e.vg/api/channel/:id?limit=1&page=1

API를 통해 선택 채널에서 항목을 가져오려면 이 끝점을 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

매개변수 설명
limit (선택사항) 페이지별 데이터 결과
page (선택 사항) 현재 페이지 요청
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;
서버 응답
{
    "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"
            }
        ]
    }
}
채널 만들기
POST https://www.e.vg/api/channel/add

이 끝점을 사용하여 채널을 추가할 수 있습니다.

매개변수 설명
name (필수) 채널 이름
description (선택사항) 채널 설명
color (선택 사항) 채널 배지 색상(HEX)
starred (선택 사항) 채널 별표 표시 여부(참 또는 거짓)
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;
서버 응답
{
    "error": 0,
    "id": 3,
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}
채널에 항목 할당
POST https://www.e.vg/api/channel/:channelid/assign/:type/:itemid

채널 ID, 항목 유형(링크, 바이오 또는 qr) 및 항목 ID와 함께 요청을 전송하여 항목을 모든 채널에 할당할 수 있습니다.

매개변수 설명
:channelid (필수) 채널 ID
:type (필수) 링크 또는 바이오 또는 qr
:itemid (필수) 아이템 ID
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;
서버 응답
{
    "error": 0,
    "message": "Item successfully added to the channel."
}
채널 업데이트
PUT https://www.e.vg/api/channel/:id/update

채널을 업데이트하려면 PUT 요청을 통해 유효한 데이터를 JSON으로 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예는 보낼 수 있는 모든 매개변수를 보여주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

매개변수 설명
name (선택사항) 채널 이름
description (선택사항) 채널 설명
color (선택 사항) 채널 배지 색상(HEX)
starred (선택 사항) 채널 별표 표시 여부(참 또는 거짓)
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;
서버 응답
{
    "error": 0,
    "message": "Channel has been updated successfully."
}
채널 삭제
DELETE https://www.e.vg/api/channel/:id/delete

채널을 삭제하려면 DELETE 요청을 보내야 합니다. 모든 항목도 할당 해제됩니다.

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;
서버 응답
{
    "error": 0,
    "message": "Channel has been deleted successfully."
}

캠페인

캠페인 나열
GET https://www.e.vg/api/campaigns?limit=2&page=1

API를 통해 캠페인을 가져오기 위해 이 엔드포인트를 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

매개변수 설명
limit (선택사항) 페이지별 데이터 결과
page (선택 사항) 현재 페이지 요청
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;
서버 응답
{
    "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"
            }
        ]
    }
}
캠페인 만들기
POST https://www.e.vg/api/campaign/add

이 끝점을 사용하여 캠페인을 추가할 수 있습니다.

매개변수 설명
name (선택사항) 캠페인 이름
slug (옵션) 로테이터 슬러그
public (선택 사항) 액세스
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;
서버 응답
{
    "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"
}
캠페인에 링크 할당
POST https://www.e.vg/api/campaign/:campaignid/assign/:linkid

이 끝점을 사용하여 캠페인에 짧은 링크를 할당할 수 있습니다. 엔드포인트에는 캠페인 ID와 짧은 링크 ID가 필요합니다.

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;
서버 응답
{
    "error": 0,
    "message": "Link successfully added to the campaign."
}
캠페인 업데이트
PUT https://www.e.vg/api/campaign/:id/update

캠페인을 업데이트하려면 PUT 요청을 통해 유효한 데이터를 JSON으로 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예는 보낼 수 있는 모든 매개변수를 보여주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

매개변수 설명
name (필수) 캠페인 이름
slug (옵션) 로테이터 슬러그
public (선택 사항) 액세스
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;
서버 응답
{
    "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"
}
캠페인 삭제
DELETE https://www.e.vg/api/campaign/:id/delete

캠페인을 삭제하려면 DELETE 요청을 보내야 합니다.

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;
서버 응답
{
    "error": 0,
    "message": "Campaign has been deleted successfully."
}

커스텀 스플래시

커스텀 스플래시 나열
GET https://www.e.vg/api/splash?limit=2&page=1

API를 통해 사용자 지정 시작 페이지를 가져오려면 이 끝점을 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

매개변수 설명
limit (선택사항) 페이지별 데이터 결과
page (선택 사항) 현재 페이지 요청
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;
서버 응답
{
    "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"
            }
        ]
    }
}

픽셀

픽셀 나열
GET https://www.e.vg/api/pixels?limit=2&page=1

API를 통해 픽셀 코드를 얻으려면 이 끝점을 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

매개변수 설명
limit (선택사항) 페이지별 데이터 결과
page (선택 사항) 현재 페이지 요청
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;
서버 응답
{
    "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"
            }
        ]
    }
}
픽셀 만들기
POST https://www.e.vg/api/pixel/add

이 끝점을 사용하여 픽셀을 만들 수 있습니다. 픽셀 유형과 태그를 보내야 합니다.

매개변수 설명
type (required) gtmpixel | gapixel | fbpixel | adwordspixel | linkedinpixel | twitterpixel | adrollpixel | quorapixel | pinterest | bing | snapchat | reddit | tiktok
name (필수) 픽셀의 맞춤 이름
tag (필수) 픽셀의 태그
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;
서버 응답
{
    "error": 0,
    "id": 1
}
픽셀 업데이트
PUT https://www.e.vg/api/pixel/:id/update

픽셀을 업데이트하려면 PUT 요청을 통해 유효한 데이터를 JSON으로 보내야 합니다. 데이터는 아래와 같이 요청의 원시 본문으로 전송되어야 합니다. 아래 예는 보낼 수 있는 모든 매개변수를 보여주지만 모두 보낼 필요는 없습니다(자세한 내용은 표 참조).

매개변수 설명
name (선택 사항) 픽셀의 맞춤 이름
tag (필수) 픽셀의 태그
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;
서버 응답
{
    "error": 0,
    "message": "Pixel has been updated successfully."
}
픽셀 삭제
DELETE https://www.e.vg/api/pixel/:id/delete

픽셀을 삭제하려면 DELETE 요청을 보내야 합니다.

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;
서버 응답
{
    "error": 0,
    "message": "Pixel has been deleted successfully."
}

CTA 오버레이

CTA 오버레이 나열
GET https://www.e.vg/api/overlay?limit=2&page=1

API를 통해 CTA 오버레이를 가져오려면 이 끝점을 사용할 수 있습니다. 데이터를 필터링할 수도 있습니다(자세한 내용은 표 참조).

매개변수 설명
limit (선택사항) 페이지별 데이터 결과
page (선택 사항) 현재 페이지 요청
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;
서버 응답
{
    "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"
            }
        ]
    }
}

사용자

이 끝점은 관리자 권한이 있는 사용자만 액세스할 수 있습니다.

사용자 나열
GET https://www.e.vg/api/users?filter=free

플랫폼의 모든 사용자 목록을 가져옵니다. URL에 필터 매개변수를 전송하여 데이터를 필터링할 수 있습니다.

매개변수 설명
filter 관리자 | 무료 | 찬성
email 이메일로 사용자 검색
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;
서버 응답
{
    "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"
        }
    ]
}
단일 사용자 나열
GET https://www.e.vg/api/user/:id

단일 사용자에 대한 데이터를 가져옵니다.

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;
서버 응답
{
    "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"
    }
}
사용자 생성
POST https://www.e.vg/api/user/add

사용자를 생성하려면 이 엔드포인트를 사용하고 다음 정보를 JSON으로 전송합니다.

매개변수 설명
username (필수) 사용자의 사용자 이름. 유효해야 합니다.
email (필수) 사용자의 이메일. 유효해야 합니다.
password (필수) 사용자의 비밀번호입니다. 최소 5자.
planid (선택 사항) 프리미엄 플랜. 이것은 관리자 패널에서 찾을 수 있습니다.
expiration (선택) 멤버십 만료 예시 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;
서버 응답
{
    "error": 0,
    "message": "User has been registered.",
    "data": {
        "id": 3,
        "email": "[email protected]",
        "username": "user"
    }
}
사용자 삭제
DELETE https://www.e.vg/api/user/:id/delete

사용자를 삭제하려면 이 끝점을 사용하세요.

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;
서버 응답
{
    "error": 0,
    "message": "User has been deleted."
}
로그인 사용자
GET https://www.e.vg/api/user/login/:id

이 끝점은 사용자가 플랫폼에 자동으로 로그인할 수 있도록 하는 고유한 링크를 생성합니다. SSO 로그인 URL은 1시간 동안 유효하며 1회 사용할 수 있습니다.

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;
서버 응답
{
    "error": 0,
    "url": "https:\/\/www.e.vg\/user\/login\/sso\/myqrfphjwiswimunlzhlnzlaymetidff"
}

계획

이 끝점은 관리자 권한이 있는 사용자만 액세스할 수 있습니다.

계획 나열
GET https://www.e.vg/api/plans

플랫폼의 모든 계획 목록을 가져옵니다.

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;
서버 응답
{
    "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"
                }
            }
        }
    ]
}
사용자를 플랜에 가입
PUT https://www.e.vg/api/plan/:planid/user/:userid

사용자를 계획에 등록하려면 계획 ID 및 사용자 ID와 함께 이 끝점에 PUT 요청을 보냅니다. 구독 유형과 만료 날짜를 지정해야 합니다. 만료일이 지정되지 않은 경우 종류에 따라 날짜가 조정됩니다.

매개변수 설명
type 월간 | 매년 | 일생
expiration (선택 사항) 계획의 만료 날짜 예:2024-05-25 11:30:59
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-25 11:30:59"
}'
$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-25 11:30:59',
)),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
서버 응답
{
    "error": 0,
    "message": "User has been subscribed to this plan."
}