I see the problem now. You are using Discourse as the SSO provider for WordPress. That function is meant to be used when WordPress is the SSO provider for Discourse. The function is poorly named. The name should make it clear what the use case is.
For the case where Discourse is the SSO provider for WordPress, what you need to do is make an authenticated API request to /admin/users/$user_id.json. $user_id needs to be set to the user’s Discourse id. For users who have logged into WordPress via Discourse, you can get their Discourse user id with:
get_user_meta( $wp_user_id, 'discourse_sso_user_id', true );