Tech Talk
1 MIN READ
How to use a bearer token for authentication using Python SDK
Javier
Neophyte
11 months agoI am trying to use a bearer token for authentication using Python SDK.
On the documentation I found several examples using the LMv1 access_id and access_key values, like this:
# Configure API key authorization: LMv1
configuration = logicmonitor_sdk.Configuration()
configuration.company = 'YOUR_COMPANY'
configuration.access_id = 'YOUR_ACCESS_ID'
configuration.access_key = 'YOUR_ACCESS_KEY'
# create an instance of the API class
api_instance = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration))
but couldn’t find any example on using bearer token for authentication.
After some search I found something about defining “api_token” and “api_token_prefix” but couldn’t get it to work.
Anybody have any example I could follow to use this?
Published 11 months ago
Version 1.0Javier
Neophyte
Joined August 06, 2021
Tech Talk
Access exclusive insights and technical expertise from the LogicMonitor Product Team in our dedicated forum. Stay informed about product updates, enhancements, and advanced troubleshooting techniques straight from the experts themselves. Engage with fellow users, ask questions, and gain valuable insights to optimize your monitoring infrastructure. Join the discussion today and elevate your monitoring capabilities with LogicMonitor.