OAUTH flow to Integrate the discourse community account with the third party CRM tool where it can create tickets of community

I want to integrate discourse Account with the CRM tool that I have where what
I want is as follows :-

  1. User can add their Discourse community account in my tool using his discourse loginId and password .
  2. Discourse should send the auth code to the callback Url that I will send to it
  3. Using which i want to get (Access token & refresh token ) from discourse That I will later use to call discourse APIS to fetch community data and create tickets with them.

I would work through this documentation:

1 Like

Thanks @thoka
Create and configure API key :
Working with this docs is like generating API key from the discourse ( community account ) and then adding that API key manually at my web app which i will later use for api call.

I will explain my use case little more detailed :-
User can click on button [add Discourse]
it will redirect him to the discourse OAUTH page where user will grant me all permissions
after click on accept the dicourse will return the token to my callbackUrl
which i Will store and use for further API CALL

Is there any documentation that can help me achieve the same.