API Данные для отправки

Аутентификация и авторизация

Для авторизации необходимо в заголовке запроса передать API ключ.

Request Header:

X-AUTH-TOKEN string уникальный авторизационный токен проекта

Создание профиля

JUID - идентификатор юзера в Just, присваивается юзеру при создании профиля на сайте. Необходим для работы с подписками и активностью юзеров. Действуем в рамках сайта на котором был создан профиль.

Endpoint
POST /api/user/v1/subscription/create/profile

Parameters

No parameters.

More parameters

  • ip string - требуется для определения geo юзера и его часового пояса. При отсутствии этого параметра или если определить geo не представляется возможным - часовой пояс будет задан по умолчанию, в зависимости от настроек сайта
  • name string
  • gender string
  • birthDate int (timestamp)

Request

curl --request POST 'https://api.justservices.cc/api/user/v1/subscription/create/profile' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/subscription/create/profile',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => array('ip' => '8.8.8.8','name' => 'Bob'),
    CURLOPT_HTTPHEADER => array(
      'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS',
      'Cookie: device_view=full'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/subscription/create/profile"

payload={'ip': '8.8.8.8',
'name': 'Bob'}
files=[

]
headers = {
    'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS',
    'Cookie': 'device_view=full'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/subscription/create/profile"
    method := "POST"

    payload := strings.NewReader(``)

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

Response

de6f0132ea9e412599ae31262c45633b
Error save data

Создание Емейл подписки

Endpoint
POST /api/user/v1/subscription/subscribe/email

Attributes:

  • juid string
  • email string

More attributes:

  • regUrl string
  • refid string
  • refidm string
  • utmSource string
  • utmMedium string
  • utmCampaign string

Request

curl --location --request POST 'https://api.justservices.cc/api/user/v1/subscription/subscribe/email' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS' \
--form 'juid="de6f0132ea9e412599ae31262c45633b"' \
--form 'email="email@email.com"'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/subscription/subscribe/email',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => array('juid' => 'de6f0132ea9e412599ae31262c45633b','email' => 'email@email.com'),
    CURLOPT_HTTPHEADER => array(
        'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/subscription/subscribe/email"

payload={'juid': 'de6f0132ea9e412599ae31262c45633b',
'email': 'email@email.com'}
files=[

]
headers = {
  'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
package main

import (
    "fmt"
    "bytes"
    "mime/multipart"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/subscription/subscribe/email"
    method := "POST"

    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    _ = writer.WriteField("juid", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")
    _ = writer.WriteField("email", "email@email.com")
    err := writer.Close()
    if err != nil {
        fmt.Println(err)
        return
    }


    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

    req.Header.Set("Content-Type", writer.FormDataContentType())
    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

Response


JuId empty / Not validate email
User not found
Error save data

Деактивация Емейл подписки

Endpoint
POST /api/user/v1/subscription/unsubscribe/email

Attributes:

  • juid string
  • email string

Request

curl --location --request PUT 'https://api.justservices.cc/api/user/v1/subscription/unsubscribe/email' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS' \
--form 'juid="de6f0132ea9e412599ae31262c45633b"' \
--form 'email="email@email.com"'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/subscription/unsubscribe/email',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS => array('juid' => 'de6f0132ea9e412599ae31262c45633b','email' => 'https://everydayhoroscopes.devop/'),
  CURLOPT_HTTPHEADER => array(
    'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/subscription/unsubscribe/email"

payload={'juid': 'de6f0132ea9e412599ae31262c45633b',
'email': 'email@email.com'}
files=[

]
headers = {
  'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
}

response = requests.request("PUT", url, headers=headers, data=payload, files=files)

print(response.text)
package main

import (
    "fmt"
    "bytes"
    "mime/multipart"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/subscription/unsubscribe/email"
    method := "PUT"

    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    _ = writer.WriteField("juid", "de6f0132ea9e412599ae31262c45633b")
    _ = writer.WriteField("email", "email@email.com")
    err := writer.Close()
    if err != nil {
        fmt.Println(err)
        return
    }


    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

    req.Header.Set("Content-Type", writer.FormDataContentType())
    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

Response


JuId is missing | Mandatory parameter is missing
User not found | Subscription not found

Создание SMS подписки

Endpoint
POST /api/user/v1/subscription/subscribe/sms

Attributes:

  • juid string
  • number string

More attributes:

  • regUrl string
  • refid string
  • refidm string
  • utmSource string
  • utmMedium string
  • utmCampaign string

Request

curl --location --request POST 'https://api.justservices.cc/api/user/v1/subscription/subscribe/sms' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS' \
--form 'juid="de6f0132ea9e412599ae31262c45633b"' \
--form 'number="00000000000"'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/subscription/subscribe/sms',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('juid' => 'de6f0132ea9e412599ae31262c45633b','number' => '00000000000'),
CURLOPT_HTTPHEADER => array(
'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/subscription/subscribe/sms"

payload={'juid': 'de6f0132ea9e412599ae31262c45633b',
'number': '00000000000'}
files=[

]
headers = {
'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
package main

import (
    "fmt"
    "bytes"
    "mime/multipart"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/subscription/subscribe/sms"
    method := "POST"

    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    _ = writer.WriteField("juid", "de6f0132ea9e412599ae31262c45633b")
    _ = writer.WriteField("number", "00000000000")
    err := writer.Close()
    if err != nil {
      fmt.Println(err)
      return
    }


    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

    req.Header.Set("Content-Type", writer.FormDataContentType())
    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

Response


JuId empty | Not validate number
User not found
Error save data

Деактивация SMS подписки

Endpoint
POST /api/user/v1/subscription/unsubscribe/sms

Attributes:

  • juid string
  • number string

Request

curl --location --request POST 'https://api.justservices.cc/api/user/v1/subscription/subscribe/sms' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS' \
--form 'juid="de6f0132ea9e412599ae31262c45633b"' \
--form 'number="00000000000"'                                                                                                                                                 
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/subscription/subscribe/sms',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => array('juid' => 'de6f0132ea9e412599ae31262c45633b','number' => '00000000000'),
    CURLOPT_HTTPHEADER => array(
      'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/subscription/subscribe/sms"

payload={'juid': 'de6f0132ea9e412599ae31262c45633b',
'number': '00000000000'}
files=[

]
headers = {
  'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)                                                                                                                                                                   
package main

import (
    "fmt"
    "bytes"
    "mime/multipart"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/subscription/unsubscribe/sms"
    method := "PUT"

    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    _ = writer.WriteField("juid", "de6f0132ea9e412599ae31262c45633b")
    _ = writer.WriteField("number", "00000000000")
    err := writer.Close()
    if err != nil {
        fmt.Println(err)
        return
    }


    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

    req.Header.Set("Content-Type", writer.FormDataContentType())
    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

Response


JuId is missing | Mandatory parameter is missing
User not found | Subscription not found

Обновление меток

Endpoint
PUT api/user/v1/subscription/update/utm-metric/channel/:channel

Attributes:

  • channel sms|email|push Канал подписок
  • data string

Request

curl --location --request PUT 'https://api.justservices.cc/api/user/v1/subscription/update/utm-metric/channel/email' \
--header 'X-AUTH-TOKEN: 0zNPYIFit4eqkGm7Mvd5WVfAU9ngXOy' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'data="{"email":"123@123.com","refid":2,"number":99988800066,"refid":"ch-api_src-tyuuyt-api","refidm":"wwwtttoedhtiuyuburoncoreg11893200170333w0722"}"'                                                                                           
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/subscription/update/utm-metric/channel/email',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => 'data=%22%7B%22email%22%3A%22123%40123.com%22%2C%22refid%22%3A2%2C%22number%22%3A99988800066%2C%22refid%22%3A%22ch-api_src-a8oPRJ4_lp-api%22%2C%22refidm%22%3A%22wwwtttoedhtiburoncoreg11893200170333w0722%22%7D%22',
CURLOPT_HTTPHEADER => array(
'X-AUTH-TOKEN: 0zNPYIFit4eqkGm7Mvd5WVfAU9ngXOy',
'Content-Type: application/x-www-form-urlencoded'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/subscription/update/utm-metric/channel/email"

payload='data=%22%7B%22email%22%3A%22123%40123.com%22%2C%22refid%22%3A2%2C%22number%22%3A99988800066%2C%22refid%22%3A%22ch-api_src-a8oPRJ4_lp-api%22%2C%22refidm%22%3A%22wwwtttoedhtiburoncoreg11893200170333w0722%22%7D%22'
headers = {
'X-AUTH-TOKEN': '0zNPYIFit4eqkGm7Mvd5WVfAU9ngXOy',
'Content-Type': 'application/x-www-form-urlencoded'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text)                                                                                                                                   
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/subscription/update/utm-metric/channel/email"
    method := "PUT"

    payload := strings.NewReader("data=%22%7B%22email%22%3A%22123%40123.com%22%2C%22refid%22%3A2%2C%22number%22%3A99988800066%2C%22refid%22%3A%22ch-api_src-a8oPRJ4_lp-api%22%2C%22refidm%22%3A%22wwwtttoedhtiburoncoreg11893200170333w0722%22%7D%22")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
        return
    }
    req.Header.Add("X-AUTH-TOKEN", "0zNPYIFit4eqkGm7Mvd5WVfAU9ngXOy")
    req.Header.Add("Content-Type", "application/x-www-form-urlencoded")

    res, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(string(body))
}

Response

Metrics updated
Invalid data
Unprocessable Entity

Сохранение действий

Endpoint
POST /api/user/v1/action/

Attributes:

  • juid string
  • tags string
  • label string

More attributes:

  • article string

Request

curl --location --request POST 'https://api.justservices.cc/api/user/v1/action/' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS' \
--form 'juid="de6f0132ea9e412599ae31262c45633b"' \
--form 'tags="1,2,3"' \
--form 'label="login"'                                                                                                                                           
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/action/',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => array(,,),
    CURLOPT_HTTPHEADER => array(
      'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
import requests

url = "https://api.justservices.cc/api/user/v1/action/"

payload={}
files=[

]
headers = {
  'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)                                                                                                                                                  
package main

import (
    "fmt"
    "bytes"
    "mime/multipart"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.justservices.cc/api/user/v1/action/"
    method := "POST"

    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    _ = writer.WriteField("juid", "de6f0132ea9e412599ae31262c45633b")
    _ = writer.WriteField("tags", "1,2,3")
    _ = writer.WriteField("label", "login")
    err := writer.Close()
    if err != nil {
    fmt.Println(err)
    return
    }


    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
    fmt.Println(err)
    return
    }
    req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

    req.Header.Set("Content-Type", writer.FormDataContentType())
    res, err := client.Do(req)
    if err != nil {
    fmt.Println(err)
    return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
    fmt.Println(err)
    return
    }
    fmt.Println(string(body))
}

Response

Request accepted

Получение информации о емейлов профилей сегмента

Endpoint
GET /api/user/v1/segments/segment/:SegmentID/channel/email

Parameters

  • offset integer - Смещение, для постраничной выборки
  • limit integer - лимит числа емейлов

Request

curl --request GET 'https://api.justservices.cc/api/user/v1/segments/segment/235/channel/email?offset=0&limit=100' \
--header 'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
    <?php

    $curl = curl_init();

    curl_setopt_array($curl, array(
      CURLOPT_URL => 'https://api.justservices.cc/api/user/v1/segments/segment/235/channel/email?offset=0&limit=100',
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => '',
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 0,
      CURLOPT_FOLLOWLOCATION => true,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => 'GET',
      CURLOPT_HTTPHEADER => array(
        'X-AUTH-TOKEN: cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
      ),
    ));
    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
    import requests

    url = "https://api.justservices.cc/api/user/v1/segments/segment/235/channel/email?offset=0&limit=100"

    payload={}
    headers = {
    'X-AUTH-TOKEN': 'cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS'
    }

    response = requests.request("GET", url, headers=headers, data=payload)

    print(response.text)                                                                                                                                                   

    package main

    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )

    func main() {

        url := "https://api.justservices.cc/api/user/v1/segments/segment/235/channel/email?offset=0&limit=100"
        method := "GET"

        client := &http.Client {
        }
        req, err := http.NewRequest(method, url, nil)

        if err != nil {
            fmt.Println(err)
            return
        }
        req.Header.Add("X-AUTH-TOKEN", "cLH6gah9CVp1j9kNoGrvl0i1rzLXSWDS")

        res, err := client.Do(req)
        if err != nil {
            fmt.Println(err)
            return
        }
        defer res.Body.Close()

        body, err := ioutil.ReadAll(res.Body)
        if err != nil {
            fmt.Println(err)
            return
        }
        fmt.Println(string(body))
    }
Response

[
"test@email.ru",
"test2@email.ru",
"test3@email.ru",
]
Error service