Training
For clients
Загружается...
In VK Ads there is an option share your own data lists and counters Top@Mail.ru with other users.
The procedure itself is as follows: the owner of the source generates a special key, provides it to the client, and the client activates the key, which gives him access to use this source.
Request for key generation:
POST /api/v2/sharing_keys.json
{ "sources": [ { "object_type": "users_list", "object_id": 123456, }, ....] "users": [ {"username": "lamoda@mail.ru"}, ...], "send_email": true/false, "price": float, "payment_type": "free"|"fixed_cpm", "is_marketplace": true/false }
Response:
{ "sharing_key": "absgd124ldsg0900", "sharing_url": "https://ads.vk.ru/activate_sharing_key?key=absgd124ldsg0900" }
Important! Generating a key does not automatically grant the client the right to use the list. The user must activate the key to get access to using the list.
View shared sources:
GET /api/v2/sharing_keys.json
Response:
{ "items": [ { "sources": [ {"object_type": "users_list", "object_id": 123456}, ...], "owner": {"id": 431, "username": "user_list_owner_name"}, "users": [ {"id": 432, "username": "user_list_client_name"}, ... ], } ] }
The response contains all users, regardless of whether they have activated the key or not yet.
You can revoke access by using a request:
DELETE /api/v2/sharing_keys/<key>.json
Key activation:
POST /api/v2/sharing_keys/<key>.json
{"status": "active"}
The client can delete the source they activated just as well as their own. For user lists:
DELETE /api/v1/remarketing_users_list/{users_list_id}.json
For counters Top@Mail.ru:
DELETE /api/v1/remarketing_counters/<counter_id>.json