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

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.