# 🔑 Values

## key / token

DO NOT SHARE IT

The token is needed for authorization and operation of requests from your account. There are 3 ways to get a token:

**Local Storage**

1. Open DevTools in your browser
2. Go to Storage -> Local Storage -> char\_token
3. Copy `value`

**Console**

1. Open DevTools in your browser
2. Go to Console tab and enter this code:
3. `JSON.parse(localStorage.getItem('char_token')).value`

**Tampermonkey**

1. Download [this](https://greasyfork.org/ru/scripts/468233-cai-token) userscript
2. Go to cAI Profile Settings and look down

## char / char\_external\_id

Unique ID for characters

1. Open the chat page with the character
2. Copy `char` value from URL

<figure><img src="/files/MOPBflC8j5DJGx5qtF6D" alt=""><figcaption></figcaption></figure>

## history\_external\_id / external\_id

Unique ID for character history

if you look at the responce of `character.get_histories()`, then you will see that each story has its own external\_id

## topic\_external\_id / topic

The ID of the feed, I don't know where it comes from and how to get it. Also, community feed have their topic\_external\_id, you can get them in `post.get_topics()`

## tgt / username

It is also a character identifier. It would be more correct to call it the nickname of the character

## creator\_id

Your account ID. Needed for functions with chat2, stored in your account information

```python
user = await client.user.info()
print(user['user']['user']['id'])
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pycai.gitbook.io/welcome/api/values.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
