![]() Now, say your user, Carmela, wants to label all incoming emails from the very important Leon Tallparrot so that his missives don’t ever get lost in the mix. The following attributes are available for the Account object, so now you can print account.provider and it will return the provider, e.g. Now, you can simply instantiate the account object: account = nylas.account You have the CLIENT_ID, CLIENT_SECRET, and ACCESS_TOKEN from setting up your account earlier in ‘Setup Steps’, and just need to pass those in here: from nylas import APIClient In order to do this, we want to do what we always do when using the Python SDK: configure the API Client – this is how the Nylas Communication Platform interfaces with all of the major providers. Creating Folders and Labelsīefore creating a folder or label, you may want to call the /account endpoint to simply check which organization unit is relevant for your purposes. All other providers, including Microsoft, Yahoo, and IMAP providers, use folders. You may be wondering: what’s the difference? If your user’s account is Gmail, the account’s organization unit is a label. You can find instructions on how to do this here. ![]() Next, ensure you have pip installed on your development environment and create a virtual environment to install Nylas. At the end of the guide, you’ll have your CLIENT_ID (found on the dashboard page for your Nylas App), CLIENT_SECRET (found on the dashboard page for your Nylas App) and ACCESS_TOKEN (provided when you authenticate an account to your Nylas App). To get these, sign up for a Nylas developer account and follow our guide to get your API keys and authorize your first email account. Setup StepsĪll you need are three tokens to follow along with the code examples. This is the year you help your users get organized-and what’s a better place to start than by creating or updating the units of organization? In this blog post, we’ll take a look at how to do just that by creating and updating inbox folders and labels using the Nylas Python SDK. With email usage and users only growing, there’s no better time to start working with an API to build full email features into your app. Helping users stay organized is worth its weight in gold – but we all know that building full sync and CRUD features between your app and the backbone of your users’ daily life (their email inbox) is painstakingly slow and challenging without the help of an API.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |