🧑

User

Created
Jun 7, 2021 09:37 AM
Tags
Description
Documentation on retrieving basic user info
The user API allows you to retrieve limited information about the authenticated user. This info includes their usernames across linked platforms, as well as their userId on those platforms when applicable.

Base URL

All of the routes to follow will be based on the base URL:
https://api2.pixelchat.tv/public
 

User Info

Route

/user

Methods

GET

Response

{
	"username": "ACPixel",
	"linkedAccounts": ["twitch", "glimesh", "spotify"],
	"accountInfo": {
		"twitch": {"username": "ACPixel", "userId": "1234"},
		"glimesh": {"username": "ACPixel", "userId": "1234", "channelId": "4321"},
		"spotify": {"username": "ACPixel", "userId": "1234"}
	}
}

JavaScript Fetch Example

const req = await fetch(`https://api2.pixelchat.tv/public/user`, 
	{
		headers: {
			"x-api-key": "asdf12344321fdsa"
		}
	}
)

const res = await req.json();

console.log(res)
Â