How to Link Discord OAuth with Memberstack 2.0 for Automatic User Profile Sync Answered
Does anyone happen to know if its possible to setup Discord OAuth with Memberstack 2.0?
Does anyone happen to know if its possible to setup Discord OAuth with Memberstack 2.0?
Comments
13 comments
I don't know if its possible, but I do know a direct integration is on the wishlist https://docs.memberstack.com/hc/en-us/community/posts/10751498679067--Wishlist-Integration-Discord
Ok thank you very much
We’re very interested in Discord signing/signup,
Is it something planned? What is a possible workaround to support Discord?
I was doing some research about this topic, and I got to the conclusion that this solution should be developed by Memberstack. 🤔
The CustomSSO integration allows Memberstack users to be authorized in different applications, but what is really needed in this scenario is Discord users to be authorized in Memberstack applications.
I thought about assigning the login responsibility using the admin package to create a user with a custom server, but still, even if I manage to obtain the token from Discord authorizing the user, there's no method to login to MS via that provider (only the existing providers or by password). So I wouldn't be able to override it unless I also generate and save the password in a database, that would defeat the purpose of using Memberstack 😅
Hey guys,
I have problems regarding Memberstack API. I have bot code that is on GitHub and deployed on Heroku, that bot gives user "Authorization" Discord page (OAuth2) and when user authorizes he gets added to my Discord server, but when he joins Discord server his discord username should be grabbed and put in Memberstack field "discord" of that user that clicked button - this is done by his memberstack user ID.
In heroku logs its showing that all the process works perfectly until its time to update Memberstack field. I have tried multiple methods and these are the errors that showed up:
Have you tried emulating your request using postman to see if it goes thru? 🤔
What method are you using to update the customer fields?
(It grabs Memberstack ID of current user - adds him to the server - and then attempt to update field in memberstack but then those errors pop out)
Oh wait, are you using the REST library, right? But where did you get those endpoints? Are you using Memberstack v1? 🤔
In the official docs, the base url is https://admin.memberstack.com/members
Im using node-fetch library, and you are right about endpoints when I changed them Im not getting those errors but now I got this error:
And Im sure I used proper secret key
Remember that Memberstack handles two different environments, test and production. Make sure your secret key is NOT from the test enviroment.
You can identify if the secret key or public key are from test environment if they have
_sb_
which stands for sandbox.Is there any API endpoint for test environment, because I am still testing the whole process?
It's the same endpoint, but different keys that set which environment you are using. If your using pk_sb_... and sk_sb_... means you are working with your test users. And if you're using pk_... and sk_... you are using production users.
Check your headers, use this documentation as your example, it uses x-api-key: sk_... header to authorize connections, instead of Authorization header.
I always recommend testing your endpoints in Postman (or similar tools) before implementing it in code.
Thank you so much for fast and helpful response. I solved my issue.
Please sign in to leave a comment.