> For the complete documentation index, see [llms.txt](https://valobot.gitbook.io/vbasen/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://valobot.gitbook.io/vbasen/auth.md).

# 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.

<pre class="language-python"><code class="lang-python"><strong>from vbaspy.auth import RiotAuth
</strong>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()))
</code></pre>

Run the code with your riot ID and PW, it will give the result like below.

```python
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!
