GLEF1X / glQiwiApi

🥝 The ultrarapid and multifunctional wrapper over QIWI and YooMoney
https://glqiwiapi.readthedocs.io/en/latest/
MIT License
82 stars 11 forks source link

Empty access_token #111

Open TrixiS opened 1 year ago

TrixiS commented 1 year ago
  1. Try to authorize your app
  2. After all steps done get empty string from YooMoneyAPI.get_access_token method

Code for repro

import asyncio

from glQiwiApi import YooMoneyAPI

async def get_url_to_auth() -> None:
    client_id = input("CLIENT ID: ")
    redirect_url = input("REDIRECT URL: ")

    print(
        await YooMoneyAPI.build_url_for_auth(
            scopes=["account-info", "operation-history"],
            client_id=client_id,
            redirect_uri=redirect_url,
        )
    )

    access_token = await YooMoneyAPI.get_access_token(
        code=input("CODE: "),
        client_id=client_id,
        redirect_uri=redirect_url,
    )

    print("ACCESS_TOKEN:", access_token)

asyncio.run(get_url_to_auth())

System info: Windows 10, Python 3.10