Look up a user profile by platform and platform user ID with JSON:API format.
Returns the internal UUID for a user profile based on its platform-specific identifier. Auto-creates the profile if it doesn’t exist (for service accounts/bots).
Args: platform: Platform type (discord, discourse, github, email) platform_user_id: Platform-specific user ID provider_scope: Provider scope (e.g., Discourse domain). Defaults to ''. For Discourse, this must be the instance domain (not '').
Returns: JSON:API formatted response with user profile details
Raises: 404: If user profile not found and user is not a service account 400: If platform is not a valid AuthProvider or if Discourse lookup missing provider_scope
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Platform type (discord, discourse, github, email)
Platform-specific user ID (e.g., Discord user ID, Discourse user ID)
Provider scope (e.g., Discourse domain). '*' for global.
Successful Response
JSON:API response for user profile lookup.
JSON:API resource object for user profile lookup response.
JSON:API links object for pagination and resource links.
Uses field aliases for 'self' and 'next' which are Python reserved words. Always use by_alias=True when serializing. Includes JSON:API 1.1 'describedby' link for API documentation.