Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty access_token #111

Open
TrixiS opened this issue Mar 21, 2023 · 0 comments
Open

Empty access_token #111

TrixiS opened this issue Mar 21, 2023 · 0 comments

Comments

@TrixiS
Copy link

TrixiS commented Mar 21, 2023

  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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant