Как получить временный токен CODE в API Яндекс.Деньги?
В документации yandex-money-sdk-pytthon есть пункт:
- After that, user fills Yandex.Money HTML form and user is redirected back to REDIRECT_URI?code=CODE.
Как получить необходимый CODE? Работаю с API Яндекс.Деньги,хочу привязать платежку Яндекс.Денгьги к Telegram.
from telebot import types
import requests
from yandex_money.api import Wallet, ExternalPayment
import yandex_oauth
def autorization():
scope = ['account_info', 'operation_history']
auth_url = Wallet.build_obtain_token_url(client_id,redirect_uri, scope)
OAY = yandex_oauth.OAuthYandex(oauth_client_id, client_secret)
code = OAY.get_code()
CODE = OAY.get_token(code)
access_token = Wallet.get_access_token(client_id, CODE, redirect_uri)