Yes it’s possible to check the online status of users, using the Get Streams endpoint.
No scopes are required, but you MUST have a valid OAuth token. I’m not familiar with that lib you’re using but make sure you’re generating an OAuth token (App Access token if making the requests server-side, or if this is something that’s being run client-side then use the Implicit auth flow).