When your user calls your endpoints and you need to verify their API Key then you use the following:
from oneloop_client.types import VerifyApiKeyResponse# Verify the API keyverify_response: VerifyApiKeyResponse =Nonetry: verify_response = oneloop_client.verify_api_key( key="<API_KEY>",# The Api Key that was generated for the user (either through the SDK or dashboard) requested_scopes=[{"id":"balance_transfer",# The requested scope"representation":"balance_transfer","read":False,"create":True,# Allow creation"update":False,"del":False}])except Exception as e: error: ErrorResponse = json.loads(e.body) code = error['error']['code'] message = error['error']['message']raise HTTPException(status_code=code, detail=message)if verify_response and verify_response.status !="VALID":raise HTTPException(status_code=401, detail=verify_response.status)