Good day,
I’ve been trying to use Roblox’ new presence API to check an users last online date; however, I have only received error statements so far.
My code looks like this:
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
}
data = {
"userIds": [
1843923756
]
}
response = requests.post('https://presence.roblox.com/v1/presence/users', headers=headers, data=data)
print(response.text)
The cURL outputted by the API docs looks like this:
"userIds": [ \
1843923756 \
] \
}' 'https://presence.roblox.com/v1/presence/users'
The Python code gives me the following error:
{"errors":[{"code":0,"message":"Invalid Request, user Ids cannot be null.","userFacingMessage":"Something went wrong"}]}
This seems quite bizarre to me, as I’ve clearly defined the userIds, does anyone see where I went wrong?
Thanks in advance!