Skip to main content

Exporting cookies from a profile

Export cookies from a profile

Description: This method allows exporting cookies from an existing profile in JSON format.

Request parameters:

ParameterTypeFormatDefaultDescription
workspaceIdintegerint64-1Workspace identifier. -1 means the default workspace.
profileIdstringuuid(required)The unique identifier of the profile from which to export cookies (required).

Example request:

POST
CURL:

curl 'http://localhost:8160/v1/profiles/{profileId}/cookies/export' \
--request POST \
--header 'Api-Token: YOUR_SECRET_TOKEN'

C#:

using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("http://localhost:8160/v1/profiles/{profileId}/cookies/export"),
Headers =
{
{ "Api-Token", "YOUR_SECRET_TOKEN" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}

Cube:
http://localhost:8160/v1/profiles/{profileId}/cookies/export

Additionally:
User-Agent: {-Profile.UserAgent-}
Api-Token: Token from UserArea2.

Response API:

Response codeResult
200 OKSuccess
500 ErrorInternal Server Error

Success Response (200 OK):

Returns exported cookies in JSON format.

Error Response (500):

{
"message": null
}