How to get authorization url
and get token url
for oauth2 from generated code
#11998
Unanswered
Gopichandar
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
swagger-codegen generate -i /path/to/api-spec.json -l python -o /output/directory
This command will generate a Python client library in the specified output directory.
`
from your_api_client import YourAPIClient
Initialize the client with your API's base URL and OAuth 2.0 credentials
client = YourAPIClient(base_url='https://your-api.com', client_id='your-client-id', client_secret='your-client-secret')
Get the authorization endpoint
auth_endpoint = client.get_oauth_authorization_endpoint() //THERE IS NO SUCH METHOD LIKE THIS
print(auth_endpoint) # Outputs the URL of the authorization endpoint
`
How to get the URL for authorization and get token?
Beta Was this translation helpful? Give feedback.
All reactions