Discourse API - Unable to query certain endpoints

You could try passing the api credentials in the header of the request instead of the query params. There should be an example in the api documentation topic.