โ Auth
How can I get Auth and Ent token?
Usually, you have to need Auth token and Ent token for using vbas
You can get those by auth with your riot ID and PW.
from vbaspy.auth import RiotAuth
import asyncio
import sys
# asyncio.run() error fix
if sys.platform == "win32":
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
INFO = '๋ผ์ด์ ID','๋ผ์ด์ ๋น๋ฐ๋ฒํธ' # Your riot ID and PW (Not the ingame nickname)
auth = RiotAuth() # Create class 'RiotAuth'
asyncio.run(auth.authorize(*INFO)) # Start
# You can get 4 variables
tokentype = auth.token_type # Auth token type. It usually bearer token.
actoken = auth.access_token # Auth token.
enttoken = auth.entitlements_token # Ent token.
puuid = auth.user_id # PUUID
# Printing the results
print("Token type: " + tokentype + "\n\nAuth token : " + actoken + "\n\nENT token : " + enttoken + "\n\nPUUID : " + puuid + "\n")
# Return with bool about it succeeded
# print("result : " + str(asyncio.run(auth.reauthorize()))
Run the code with your riot ID and PW, it will give the result like below.
Token type : Bearer
Auth token : eyJr . . .
ENT token : eyJr . . .
PUUID : 9abc350b . . .
That's the result! Auth token, Ent token, and even PUUID is important, keep it with your hands!
Last updated