[Question] How to verify the API token using this library?
See original GitHub issueHow do I use this library to verify a token?
https://api.cloudflare.com/#user-api-tokens-verify-token This is the api endpoint with a curl example. I like to use this library to verify the given token.
something like
cf = CloudFlare.CloudFlare(token=legal_token)
cf.verify_token() # returns True
cf = CloudFlare.CloudFlare(token=illegal_token)
cf.verify_token() # returns False
can help me understand how to do this with this library?
Or a way to extract token details https://api.cloudflare.com/#user-api-tokens-token-details
Because I also want to check if the token has the right permissions.
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
How can I verify a Google authentication API access token?
Using one of the Google API Client Libraries (e.g. Java, Node.js, PHP, Python) is the recommended way to validate Google ID tokens. https://developers.google....
Read more >Authenticate with a backend server - Google Developers
Send the ID token to your server; Verify the integrity of the ID token. Using a Google API Client Library; Calling the tokeninfo...
Read more >Authentication API Explorer - Auth0
Send a valid Access Token in the Authorization header, using the Bearer authentication scheme. An example is the Get User Info endpoint. In...
Read more >Google Auth Library: Node.js Client
This library comes with an OAuth2 client that allows you to retrieve an access token and refreshes the token and retry the request...
Read more >OAuth API verification FAQs - Google Cloud Platform Console ...
When you use OAuth 2.0 to get permission from your users to access this data, you use strings called scopes to specify the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@simkimsia - I added an example to call the correct API and print the result. Please try this.
See example_user_tokens.py
Like all API calls you just follow the API name to create a Python call.
Then follow the information on Cloudflare’s API page to see what values are returned. https://api.cloudflare.com/#user-api-tokens-verify-token
Hope that helps.