Remove ban from Toloker

Remove restriction from Tolokers and restore their access to tasks.

Steps to follow

1. Import Toloka-Kit

Connect the Toloka-Kit library to your script.

import toloka.client as toloka

2. Instantiate TolokaClient

Replace the sample API key with your own one.

toloka_client = toloka.
TolokaClient
('PlaceYourRealApiKey_Here', 'PRODUCTION');

3. Remove ban from Toloker

Find out the ID of the ban. This ID is unique for each Toloker whom you banned on your projects or pools. Use the delete_user_restriction() method to remove the skill from the Toloker.

toloka_client.
delete_user_restriction
(user_restriction_id='163293423')

If everything goes as expected, the request will return an empty response.

Complete code: Remove ban from Toloker

import toloka.client as toloka
toloka_client = toloka.TolokaClient('PlaceYourRealApiKey_Here', 'PRODUCTION')
toloka_client.delete_user_restriction(user_restriction_id='163293423')
List of classes and methods used in this recipe

See also

Last updated: July 19, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming