update_auth

update_auth()

async def update_auth(api_id: int | str, api_hash: str, session_path: str, session_name: str) -> str

Returns

A string containing updated authData

Parameters

  • api_id (int | str): your api_id from my.telegram.org/auth

  • api_hash (str): your api_hash from my.telegram.org/auth

  • session_path (str, optional): path where the session file will be saved. Default is current directory.

  • session_name (str, optional): name of the session file. Default is "account"

Example

from aportalsmp.auth import update_auth
import asyncio

API_ID = 123456789  # your api_id from my.telegram.org/auth
API_HASH = ""  # your api_hash from my.telegram.org/auth
authData = asyncio.run(update_auth(api_id=API_ID, api_hash=API_HASH))

Last updated