This repository has been archived by the owner on Jun 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Friends
Paweł Lidwin edited this page Jan 4, 2022
·
2 revisions
Chat functionality allows you to text with your friends through GOG.
Web interface can be found under https://www.gog.com/account/chat
USERID is a ID of currently logged in user
API URL: https://chat.gog.com/
GET /users/USERID
/friends
Returns list of Users
{
"items": [{
"user_id": "USERID",
"username": "Nickname",
"is_employee": false,
"images": {
"medium": "https://images.gog.com/4b28fd97134bb6ceea90f443c84db054fa48e21e693f649e8dd8f7dac2a5ae3c_avm.jpg",
"medium_2x": "https://images.gog.com/4b28fd97134bb6ceea90f443c84db054fa48e21e693f649e8dd8f7dac2a5ae3c_avm2.jpg"
}
}]
}
GET /users/USERID
/invitations
POST /users/USERID
/rooms/ROOMID
/messages
You have to also provide a content as application/json body:
{
"content": "Hello friend!"
}
GET /users/USERID/rooms/ROOMID/messages
Response contains total_count of messages, limit per page and actual list of returned messages
{
"total_count": 1,
"limit": 50,
"items": [
{
"id": "418723223",
"content": "test",
"date": "2021-12-27T15:20:10+00:00",
"type": "chat_message",
"from": {
"user_id": "SENDER_ID",
"username": "Sender Nickname",
"is_employee": false,
"images": {
"medium": "https://images.gog.com/4b28fd97134bb6ceea90f443c84db054fa48e21e693f649e8dd8f7dac2a5ae3c_avm.jpg",
"medium_2x": "https://images.gog.com/4b28fd97134bb6ceea90f443c84db054fa48e21e693f649e8dd8f7dac2a5ae3c_avm2.jpg"
}
}
}
]
}
Instead of trying to build custom client you can embed URL website using this url
https://chat.gog.com/users/`USERID`/chat?access_token=`ACCESS_TOKEN`&isEmbedFrom=client