DevCore is the best
Python:
from urllib import request
from time import sleep
from random import randint
import json
gift = input('Введите ID подарка: ')
tokens = []
user_id = 204923959
for token in tokens:
accinfo = json.loads(request.urlopen('https://api.vk.com/method/account.getProfileInfo?access_token='+token+'&v=5.131').read().decode('utf-8'))
while True:
if not 'response' in accinfo:
print('Похоже, токен под номером '+str(tokens.index(token))+' невалидный')
break
else:
print('Дарю подарки с аккаунта '+accinfo['response']['first_name']+' '+accinfo['response']['last_name'])
request.urlopen('https://api.vk.com/method/account.setOnline?voip=1&access_token='+token+'&v=5.131')
giftresp = json.loads(request.urlopen('https://api.vk.com/method/gifts.send?user_ids='+str(user_id)+'&gift_id='+gift+'&privacy=1&guid='+str(randint(1,99999))+'&access_token='+token+'&v=5.131').read().decode('utf-8'))
if 'error' in giftresp:
if giftresp['error']['error_code'] in [17, 1190]:
break
else:
print('Ошибка: '+json.dumps(giftresp))
break
else:
# print(giftresp)
sleep(5)