Vision
Справочник APIПрофили

Импорт Cookies

Базовый URL

POST
https://v1.empr.cloud/api/v1/cookies/import/{folderId}/{profileId}

Запрос

Заголовки запроса

Prop

Type

Параметры URL

Prop

Type

Тело запроса

Prop

Type

Примеры запроса

const url =  "https://v1.empr.cloud/api/v1/cookies/import/{folderId}/{profileId}"; const body = {  "cookies": [    {      "name": "datr",      "value": "526hZQfcuVgUDX4sZdXGrES4",      "path": "/",      "domain": ".facebook.com",      "expires": 1739638509    },    {      "name": "OTZ",      "value": "7379577_48_48_123900_44_436380",      "path": "/",      "domain": "accounts.google.com",      "expires": 1707670639    }  ]}const options = {  method: "POST",  headers: {    "X-Token": "Your Token",     "Content-Type": "application/json"  },   body: JSON.stringify(body)};fetch(url, options)  .then((response) => {    response.json().then((data) => {      console.log(data);    });  })  .catch((error) => {    console.error(error);  });
import requestsurl = 'https://v1.empr.cloud/api/v1/cookies/import/{folderId}/{profileId}' body = {  "cookies": [    {      "name": "datr",      "value": "526hZQfcuVgUDX4sZdXGrES4",      "path": "/",      "domain": ".facebook.com",      "expires": 1739638509    },    {      "name": "OTZ",      "value": "7379577_48_48_123900_44_436380",      "path": "/",      "domain": "accounts.google.com",      "expires": 1707670639    }  ]}headers = {    'X-Token': 'Your Token',    'Content-Type': 'application/json'}response = requests.post(url, headers=headers, json=body)print(response.json())
<?php$url = "https://v1.empr.cloud/api/v1/cookies/import/{folderId}/{profileId}";$token = "Your Token"; $body = '{  "cookies": [    {      "name": "datr",      "value": "526hZQfcuVgUDX4sZdXGrES4",      "path": "/",      "domain": ".facebook.com",      "expires": 1739638509    },    {      "name": "OTZ",      "value": "7379577_48_48_123900_44_436380",      "path": "/",      "domain": "accounts.google.com",      "expires": 1707670639    }  ]}';$headers = array(  'X-Token: '.$token,  'Content-Type: application/json');$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);curl_setopt($ch, CURLOPT_POSTFIELDS, $body);$data = curl_exec($ch);if (curl_errno($ch)) {    print "Error: " . curl_error($ch);} else {    var_dump($data);    curl_close($ch);}?>
// Requires tokio with features = ["macros", "rt-multi-thread"]// Requires reqwest with features = ["json"]// Requires serde_json#[tokio::main]async fn main() {    let url = "https://v1.empr.cloud/api/v1/cookies/import/{folderId}/{profileId}";    let token = "Token";     let body = serde_json::json!(        {          "cookies": [            {              "name": "datr",              "value": "526hZQfcuVgUDX4sZdXGrES4",              "path": "/",              "domain": ".facebook.com",              "expires": 1739638509            },            {              "name": "OTZ",              "value": "7379577_48_48_123900_44_436380",              "path": "/",              "domain": "accounts.google.com",              "expires": 1707670639            }          ]        }	);    let client = reqwest::Client::new();    let response = client        .post(url)        .header("X-Token", token)        .json(&body)        .send()        .await        .expect("Failed to send request")        .json::<serde_json::Value>()        .await        .expect("Failed to parse response");    dbg!(response);}
package mainimport (	"bytes"	"io"	"net/http")func main() {	url := "https://v1.empr.cloud/api/v1/cookies/import/{folderId}/{profileId}"	token := "Your Token"    body := []byte(`        {          "cookies": [            {              "name": "datr",              "value": "526hZQfcuVgUDX4sZdXGrES4",              "path": "/",              "domain": ".facebook.com",              "expires": 1739638509            },            {              "name": "OTZ",              "value": "7379577_48_48_123900_44_436380",              "path": "/",              "domain": "accounts.google.com",              "expires": 1707670639            }          ]        }	`)	client := http.Client{}	req, err := http.NewRequest("POST", url, nil)	if err != nil {		panic(err)	}	req.Header.Add("X-Token", token)    req.Header.Add("Content-Type", "application/json")    req.Body = io.NopCloser(bytes.NewReader(body))	resp, err := client.Do(req)	if err != nil {		panic(err)	}	defer resp.Body.Close()	body, _ := io.ReadAll(resp.Body)	println(string(body))}
var url = "https://v1.empr.cloud/api/v1/cookies/import/{folderId}/{profileId}";var token = "Your Token"; var body = """{  "cookies": [    {      "name": "datr",      "value": "526hZQfcuVgUDX4sZdXGrES4",      "path": "/",      "domain": ".facebook.com",      "expires": 1739638509    },    {      "name": "OTZ",      "value": "7379577_48_48_123900_44_436380",      "path": "/",      "domain": "accounts.google.com",      "expires": 1707670639    }  ]}"""var client = new HttpClient();client.DefaultRequestHeaders.Add("X-Token", token);client.DefaultRequestHeaders.Add("Content-Type", "application/json");var contentBody = new StringContent(body, Encoding.UTF8, "application/json");var response = await client.PostAsync(url, contentBody);var content = await response.Content.ReadAsStringAsync();Console.WriteLine(content);

Ответ

Пример ответа

{"data":null}

Типы

Prop

Type

На этой странице