How to use grant type authorization_code

I’m building a dashboard using Next.js and want to integrate Corteza APIs. To do this, I need to generate user-specific access tokens. I’ve already created a client with the authorization_code grant type for this purpose, but I’m having trouble generating tokens using this grant type. Could you help me with authorizing users via API calls using the authorization_code grant type?

PS: if you could share sample curl and steps to achieve this will be of great help thanks.