Requesting user data
Information
Section titled “Information”The myTT API has some routes for it to operate, but can also grab your account data based on your account ID. This is can be done with a simple URL request and your data will popup instantly!
How to do it
Section titled “How to do it”To request your account data, open your preferred browser or API viewer. Enter the URL as defined below.
https://my.ttnrtsite.me/api/user/USER_IDThe variable USER_ID is your account ID that you have when you created your account.
The complete URL will look something like this.
https://my.ttnrtsite.me/api/user/1The response will look something like this.
{ "status": 200, "data": { "id": 1, "username": "username", "fullname": "User account", "createdAt": "2024-11-06T22:01:36.000Z", "avatar": "https://my.ttnrtsite.me/usericon.png" }}You can see a part of the account information, this includes the ID, username, full name, creation date, and the avatar (is a gravatar URL). Other parts may be hidden from you to protect the user’s privacy, which can be their email in this case.
What you can do with it
Section titled “What you can do with it”Using this, you can share your profile by using a script to fetch the data or a similar way to do it. Note that not all data cannot be seen or will be appended to whatever you add the data to. If you want to have a profile banner on your website using the API, you can do so by going to the “Profile banner” in the “myTT” section of our documentation! Again, it’s up to you on how you’re going to use it!