How to get users LastLocation (User Online Status) using their usernames with roblox api

I wanna to check if a user is offline, online or playing using this api:

https://api.roblox.com/users/USER_ID/onlinestatus

this work perfectly however i wanna to do that using the username not the userId, I saw some topics which provide this api to get the user information with the username only:

https://api.roblox.com/users/get-by-username?username=USER_NAME

but that one does not give you the “LastLocation” information which i need to check if the user is playing, you can know only if he is online. I tried mixing both to make this one:

https://api.roblox.com/users/get-by-username?username=USER_NAME/onlinestatus

but that didn’t work too, I got an “User not found” error, he consider that the username is USER_NAME/onlinestatus, So does anyone know how to do this right? or is there are any other api could help me to get the “LastLocation” Information?
thanks for anyone will try to help.

1 Like

Well, request the username on the https://api.roblox.com/users/get-by-username?username=USER_NAME api. Then from the results of the api, store the userID and request the onlinestatus on the other api.

1 Like

Well I guess this is the only option I have, thanks for help!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.