How do I get the state of a user? (e.g. in-game/studio/on website)

I want to get the information if a User is currently playing, in studio, or just online on website.

1 Like

https://presence.roblox.com/docs#!/Presence/post_v1_presence_users

Yeah I checked that, I know how to GET, but how do I POST?

local payload = {
    userIds = {
        12345678
    }
}
local response = HttpService:PostAsync(url, JSONEncode(payload))

I’m not sure about this if I’m using Roblox’s own httpservice, I don’t think Roblox http service can access its own APIs?

Just use a proxy.

Post to https://presence.rprxy.xyz/v1/presence/users

Alright thanks, but there seems to be a problem with the JSONEncode?

local HttpService = game:GetService'HttpService'

local payload = {
    userIds = {
        12345678
    }
}
local response = HttpService:PostAsync(url, HttpService:JSONEncode(payload))
1 Like