![]() Since the business authentication tokens are so short-lived, it's very probable that your app will encounter EDAMUserException with the AUTH_EXPIRED error code when trying to call a business API ensure that your code accounts for this condition.Īfter authenticating to a business, you're probably going to want to view notebooks, create notes, etc. This means that your app will frequently need to re-authenticate with Evernote Business using the longer-lived OAuth token. Note: Authentication tokens issued by thenticateToBusiness are only valid for one hour (as opposed to OAuth tokens, which are good for a full year). See the type definition for all available attributes.įor the current discussion, we're most concerned with the value of thenticationToken, which we'll use to make all subsequent API calls dealing with the user's Evernote Business account. Using the return value in the above example, we can access details about the business using the AuthenticationResult instance. If an exception isn't thrown, then the user has been successfully authenticated: Once your application has authenticated to the User's Evernote account (your application has an authentication token obtained via OAuth or a developer token, in other words) and you have determined that the user is part of a business, call thenticateToBusiness to authenticate your application to their associated business, passing the token as the single parameter. You can get the User instance by calling UserStore.getUser (which requires a valid OAuth token or developer token): ![]() To determine whether a given user is associated with a business, we can query the user's User instance for the businessId member in the User's instance of Accounting. ![]() Determining if a user is part of a businessĪ valid Evernote account doesn't necessarily mean that the account holder is part of a business. But, keep in mind that sandbox is for testing and development only. Note that, while Evernote Business is a paid product, there is no charge to create or activate an Evernote Business account on sandbox.
0 Comments
Leave a Reply. |