User Profile Hidden in API after 3.4.0.beta3 Update

AI-generated summary

A user reports that after updating to Discourse 3.4.0.beta3, some users are showing as 'profile_hidden': True in API responses despite their profile visibility settings being enabled, likely due to changes restricting profile visibility for low Trust level users Restricting profile visibility of low Trust level users. The user is seeking a way to bypass this restriction when accessing data via the API. thoka suggests using API keys, and MihirR clarifies that selecting ‘Global’ scope when generating the API key will allow full access to user data.

I pull user profile data via Discourse API with the Python requests module.

After my Discourse instance update to 3.4.0.beta3, certain users are shown as 'profile_hidden': True when I make the API request, even though their “hide my public profile and presence features” setting is disabled.

I suspect it has to do with the update of Restricting profile visibility of low Trust level users.

How do I continue to pull user data via Discourse API? Is there a way in my API request to tell the Discourse server that I am an admin, not an anonymous user? Typing /u/{username}.json in the browser still shows all the information of the user.

Thank you! :pray:

Using API-keys, your python code can access the server as any user: Create and configure an API key

When you generate the API key just make sure to select Global in Scope and it will do the work.