@login_required
@require_POST
def generate_phone_token(request, emulator_id):
    phone_token = random.randint(100000, 999999)
    token = request.POST['token']
    url = request.POST['url']
    redis_key = 'qemu-phone-token-%s' % phone_token
    redis_client.set(redis_key, json.dumps({'uuid': emulator_id, 'token': token, 'url': url}), ex=300)
    return json_response({'token': phone_token})
dataset/ETHPy150Open pebble/cloudpebble/ide/api/qemu.py/generate_phone_token/original