API Options

The API page can be accessed from the Settings option from the User Icon menu. It presents user credentials (the User ID and the API Token) and displays a QR code which can quickly load the user credentials into some applications.

User ID (UID)
The User ID or Unique User ID (UID) is a complex hexadecimal number that Habitica automatically generates when a player joins, similar to a username.



You'll need it to:
 * Join a party or private guild
 * Request administrative help with your account
 * Receive Contributor Rewards if you contribute to Habitica
 * Submit a bug
 * Connect with 3rd party apps.

To find your User ID,
 * For the website: User Icon → Settings → API
 * For iOS/Android App: Settings → Account Details → User Id (tap on it to copy it to clipboard).

To find someone else's User ID, click on that person's name in Tavern Chat or any other Habitica chat room. It will be displayed on their profile. If you are already in a party with them, you can view their profile by clicking their name in the Members box on your party page.

API Token
The API token is a unique security code generated along with your User ID. It is similar to a password so it is essential that you keep this token private and never share this token with any untrustworthy applications or people! If you have accidentally shared your API token in a public space or with untrusted source you can ask in the Report a Bug Guild or email admin@habitica.com to change your API token.

To find your API Token,
 * For the website: User Icon → Settings → API
 * For iOS/Android App: Settings → Account Details → API Token (tap on it to copy it to clipboard).

QR Code
The QR code is currently used by the iOS app and the Android app to invite party members and send private messages. The QR code does not contain your API Token. Instead it contains the following URL:. For example the QR Code for WikiFAQ bot (User ID: 29bfa638-cb88-40e8-a0d0-48f455e7b2bd) is:.

Параметры API Options API API和用户ID