Oh, okay. Discourse was installed and setup for me so I didn’t see the step where the admin’s API key was generated.
I switched from application/json to form-data and got a different error, but it looks like I made it past the authentication step.
If I just included an api_key then I got an error that either the key or username was wrong, which makes sense. If I include an api_key and an api_username then I get an error 422 “unprocessable entity” or an error 400 “invalid access” depending on what I put in the api_username field.
What “username” am I supposed to use to identify an account? The user’s profile has two fields called “username” and the only one that’s populated is something that can be edited by the user.
I’m only allowing users to make a Discourse account by using SSO to pull in the account they already made on the Bubble app. There’s an “external ID” that seems to be the user’s unique ID from Bubble.
I tried replacing the api_username field with external_id but got the same “key or username is invalid” error.