Access users connected OAuth accounts from your bots
accounts
object that is passed to the bot’s main
function, as explained below.
The lil’bots plaform takes care of the OAuth flow and securely stores the user’s access tokens. It also makes sure to refresh the token when necessary so when the bot runs it can just start making API calls, without needing to worry about the OAuth flow.
accounts
field to the bot spec, with the list of accounts that the bot needs access to. Each account type is specified by the services main domain.
For example, if your bot needs access to the user’s Google account, you would specify the accounts
field in the bot spec like this:
accounts
array will be passed to the bot’s main
function, with the user’s access token for the Google account. The bot can then use this access token to make API calls on behalf of the user. For example, this is what the accounts array might look like when passed to the bot’s main
function:
Account Type | Provider | Description |
---|---|---|
google.com | Access the user’s Google account. Built in scope for Gmail, Google Drive, Calendar and other Google services. | |
Notion | notion.so | Access the user’s Notion account |
Spotify | spotify.com | Access the user’s Spotify account |
Github | github.com | Access the user’s Github account. Full admin access to GitHub accounts |