In our prior module, we discussed creating Webhooks for custom integrations and custom actions (using BetterCloud's Enterprise or API-enabled versions). In this module, we'll be discussing custom integration authentication types, such as basic, API token, and OAuth 2.0.
BetterCloud supports the following authentication types:
- API Tokens - Provides you with an access token that allows you to authenticate your connection.
- Basic Auth - Is Base64 encoded; it asks for a username and password.
- OAuth 2.0 - Is its own authentication type; but because of its complexity and different grant types, it'll be broken down into subsets.
OAuth 2.0 subsets include:
- Authorization Code grant is not supported as of today. The reason behind this is because the grant requires a separate endpoint to be set up for a callback URL for a token to be returned to (three-legged authorization), then used in the request to the API. We're unable to access the separate endpoint.
- Implicit is supported. A token or request is made and returned to BetterCloud. When a request is returned, you can use it in all future requests.
- Password, Client Credentials and Device Code(s) is supported for similar reasons to implicit, requesting and returning a token for future requests.
- Refresh Token is not supported as we have no way to dynamically replace the environment variable or token because it updates/refreshes so quickly.
After viewing this video, you'll be able to:
- Define authentication type
- Understand which authentication types are accepted by BetterCloud
Which is the One I Need?
If you're unsure of which authentication type you need, consider what you'd use in a service such as Postman. When building a Postman connection, how would you authenticate? This approach will be the way that you can also authenticate in with BetterCloud (as long as it's supported, as noted above). If you've never used Postman, it is a great idea to download it and test your authentication methodology to ensure you can hit your endpoint properly before attempting an integration in BetterCloud.
Now that we've talked about how to set up your authentication type and connect your third-party integration into BetterCloud, let's look at how to ensure your data is being passed properly from BetterCloud to the third-party provider in correctly-formatted JSON. To review the next module, Custom Integration Data Transformation Scripts, click here.