• 0

Custom HTTP Integrations and refresh/update oauth2 tokens


Question

3 answers to this question

Recommended Posts

  • 0
  • LogicMonitor Staff

Hey @PeterMattsson,

I think we've had folks run into this before, it sounds familiar. Tokens can be used pretty extensively in a Custom HTTP Integration, so in theory, you could do something like:

  • Write a scripted DataSource (applied to a Collector or other 'dummy' resource) that goes through the OAuth2 token refresh flow with the external API (we can help find an example of an OAuth flow if needed)
  • Have this same scripted DataSource reach out to the LogicMonitor API and set the token as a property at the root of the account / wherever (auto.integration.api.key)
  • Use the custom property value as a token in the API authentication of your Custom HTTP Integration (##auto.integration.api.key##)

Takes a little bit of work - but should get the job done. Hope that helps.

Cheers,

Kerry

Link to post
Share on other sites
  • 0
On 12/9/2019 at 10:53 PM, Kerry DeVilbiss said:

Hey @PeterMattsson,

I think we've had folks run into this before, it sounds familiar. Tokens can be used pretty extensively in a Custom HTTP Integration, so in theory, you could do something like:

  • Write a scripted DataSource (applied to a Collector or other 'dummy' resource) that goes through the OAuth2 token refresh flow with the external API (we can help find an example of an OAuth flow if needed)
  • Have this same scripted DataSource reach out to the LogicMonitor API and set the token as a property at the root of the account / wherever (auto.integration.api.key)
  • Use the custom property value as a token in the API authentication of your Custom HTTP Integration (##auto.integration.api.key##)

Takes a little bit of work - but should get the job done. Hope that helps.

Cheers,

Kerry

@Kerry DeVilbiss,

I am trying to use this approach and it does not seem like the property token works in the http custom header value field. 

Have you been able to use this approach?

Thanks

Ross

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.