How to use discourse api in react native?

I want to use discourse api to create community forum feature for my app.
Now I am confused what should be the normal user flow for discourse means first we need to use the createUser api or what?

1 Like

You could take a look at lexicon. It’s based on React Native and has excellent documentation, including the structure and architecture.

4 Likes

Thanks for the mention. We are actually getting ready to release version 3 of Lexicon with some changes that are relevant to this topic.

Up until now Lexicon was relying on the _t cookie auth tokens for authenticating users to the target Discourse site. In version 3 we are switching to the officially supported approach with User API keys.

@Tarun_Sharma if you’re looking to do it yourself, we’d recommend following that approach, which is outlined here: User API keys specification.

Also, Lexicon is open-source, so feel free to clone / fork the project and adapt it to your needs.

Best of luck!

3 Likes