Postman Settings for Memberful SSO Controlled Instance

AI-generated summary

The discussion revolves around setting up Postman for a Memberful SSO-controlled Discourse instance. kimardenmiller initially reported an issue with Postman returning the login HTML instead of JSON when making a query, despite having a working setup with another non-SSO instance. david clarified that the login HTML is part of the SSO provider, not the Discourse site, and suggested making a normal request to the site without an API key to follow the HTTP redirect chain. However, for API testing, david recommended using the about.json endpoint with the API key and username. Following david’s suggestions, kimardenmiller reported that the authentication is working fine after restarting Postman.

Trying to use Postman to do a basic query, it fails returning the login html. Am I getting these site setting correct for a Memberful SSO instance?

I have another non-SSO instance where Postman is working fine.

The API Gem works fine on the above SSO-controlled instance using regular credentials:

client = DiscourseApi::Client.new('https://discourse.gomomentum.org/')
client.api_key = ENV['REMOTE_DISCOURSE_API']
client.api_username = 'an_admin_username'

Since you’re using SSO, the login HTML isn’t part of the Discourse site - it is part of the SSO provider.

If you want to obtain the HTML for the login page, you need to make a normal request to https://discourse.gomomentum.org/, without an API key, and follow the HTTP redirect chain. (although, I’m not sure why you want the login HTML, that seems like an unusual requirement…)

If you just want a way to test the API, make a request for https://discourse.gomomentum.org/about.json. You just need the API key and username, no need for any SSO information.

Thanks @david. Sorry for the confusion. I did not want the html, but was just saying it was failing and returning html vs. what I wanted, json.

That said, for some reason it all the sudden is working now on firing Postman back up. No idea what changed, but the auth is working fine now.

Thanks!