oauth-2.0

Spotify Error 401 even though I, supposedly, have access_token (Python)

Spotify Error 401 even though I, supposedly, have access_token (Python) Question: import requests import base64 # Request an access token def request_access_token(): AUTH_URL = ‘https://accounts.spotify.com/api/token’ # POST auth_response = requests.post(AUTH_URL, { ‘grant_type’: ‘client_credentials’, ‘client_id’: "<client ID>", ‘client_secret’: "<client Secret>", }) # convert the response to JSON auth_response_data = auth_response.json() # save the access token print(auth_response_data) …

Total answers: 1

How and why to supply scalar scope to FastAPI oAuth2 scopes dict?

How and why to supply scalar scope to FastAPI oAuth2 scopes dict? Question: I am using FastAPI with Python 3.9. I haven’t been able to get the available oAuth2 dependencies to work with our particular Azure token authentication, and my initial attempt at using fastapi-azure-auth didn’t seem to match either. I am therefore currently sub-classing …

Total answers: 1

Make longer access tokens with django_oauth_toolkit

Make longer access tokens with django_oauth_toolkit Question: I have set up the OAuth 2.0 authentication in a Django Rest Framework project with the django_oauth_toolkit library. But I have noticed the access_token length is quite short. How can I make these tokens larger? I mean, increase the number of characters each token has. I have been …

Total answers: 1

How to authorize OpenAPI/Swagger UI page in FastAPI?

How to authorize OpenAPI/Swagger UI page in FastAPI? Question: I’m building a FastAPI application with OAuth2 and JWT authentication. I’ve got two endpoints that create the JWT token. The first is hidden from the OpenAPI page but is used by the page Authorize button. The second does the same functionality but is available to the …

Total answers: 1

Office 365 IMAP authentication via OAuth2 and python MSAL library

Office 365 IMAP authentication via OAuth2 and python MSAL library Question: I’m trying to upgrade a legacy mail bot to authenticate via Oauth2 instead of Basic authentication, as it’s now deprecated two days from now. The document states applications can retain their original logic, while swapping out only the authentication bit Application developers who have …

Total answers: 3

Unable to fetch OAuth2.0 Token from Azure-DevOps , using Python

Unable to fetch OAuth2.0 Token from Azure-DevOps , using Python Question: I am trying to use OAuth2 to access the Azure DevopsAPI, to query work-items. But I am unable to get the access tokene. I am using Python and Flask. My approach is based on these resources: Microsoft documentation , there currently Step 3 is …

Total answers: 1

ExchangeImpersonation SOAP header must be present for this type of OAuth token in Python

ExchangeImpersonation SOAP header must be present for this type of OAuth token in Python Question: Recently Microsoft has withdrawn the basic authentication service for accessing the Exchange Service. Therefore I am working on switching the authentication from basic to OAuth based. However, during the testing, I come across the below exception. File "/usr/local/lib/python3.6/site-packages/exchangelib/services/common.py", line 423, …

Total answers: 1

M2M Client Credential Flow between NetSuite and Synapse

M2M Client Credential Flow between NetSuite and Synapse Question: I am looking to create a flow somewhere in the Azure stack to allow me to get M2M authentication between Azure Synapse and NetSuite. The goal is to be able to drop the use of the ODBC connector and switch to making REST calls for pulling …

Total answers: 3

How to hit an API which is PingIdentity authenticated via Python requests?

How to hit an API which is PingIdentity authenticated via Python requests? Question: I have this API, something like this: https://baseurl.com/endpoint It is a GET API endpoint and has PingIdentity’s OIDC + Auth2.0 authentication & authorization (enabled at KONG API GATEWAY level) mechanism. The first time I hit this API via my browser, it redirects …

Total answers: 1