How to enable Django WebApp to generate JWT or OAuth token for client applications

How can I issue access tokens to client applications like JWT or OAuth for machine-to-machine authentication ?
Simply put, I have to issue a token to the Google Search module to access my web app.

For more detail.
Google Vertext-AI Search requires JWT or OAuth token to authenticate to my Django app so that My Django Web can use Google Vertext-AI Search.

I have to copy a search widget to use on the page in my DjangoWeb as figure shown below.

Below is a Google search widget on my Django Web. Right now It has an error due to the token problem.

As far as I’ve done some research, I discovered django-oauth-toolkit , This python package is the most likely to match my requirement, I tried it but I cannot do the next step after registering application as the figure below.

I am not sure of the way to create a token by using this package as a link that I tried.

Additionally,I posted questions about this problem through django-oauth-toolkit gitbhub and googlecloudcommunity, you can read both to get more detail at the 2 following links.

  1. Vertex AI Search : How to configure/set JWT or OAuth token to integrate with Django Web

  2. Basic Question :How to get token correctly after complete registration