Connected Accounts

You can choose to provide a more robust experience for your customers who already have a Grammarly account. The Connected Accounts feature allows users to connect their Grammarly account to your application so that they can access full account features and suggestions, such as their personal dictionary, style guide, and customization preferences.

How it works

Grammarly implements the industry-standard OAuth 2.0 protocol to securely issue access tokens for third-party applications.

  • Once the Connected Accounts feature is turned on for your application, users will start seeing the “Connect your Grammarly Account” menu option under the Grammarly Button.

  • After clicking “Connect your Grammarly Account,” the user will see the consent screen, which will ask the user to authorize your application to interact with their Grammarly account. The consent screen is a crucial part of the standard OAuth 2.0 flow.

  • Once the user approves the application, the Text Editor SDK receives a long-term session token that is stored in the localStorageopen in new window of your application. The session token gets automatically renewed each time a user interacts with Grammarly through the Text Editor SDK from within your application.

    The session token expires after 30 days of inactivity. Once the token expires, a user would be offered to reconnect their Grammarly account to your application. When a user reconnects, they will not be asked for consent again if they have approved your app previously.

  • A user can log out of their Grammarly account from your application by choosing the “Log out” menu option under the Grammarly Button. If they choose to connect their Grammarly account again, the consent screen will be skipped, as the user already authorized your application in the past.

A user may use your application from multiple browsers. Each browser would maintain its own connection state, as the session token is saved in localStorage that is not shared between different browser instances. However, a user will only need to approve the application via the consent screen once for your application, as the user’s consent is shared between sessions.

Grammarly Button

Turning on Connected Accounts

You can turn on this feature from the Connected Accounts section of your application. You’ll need to provide additional information to complete the authorization flow that users will go through.

You can customize the way your application is shown to users publicly by setting a display name and an app logo.

Privacy policy

Please note that you’ll need a privacy policy that states your commitment to your customers. This would be in addition to Grammarly’s own privacy policy, which does not cover your application’s privacy practices.

Last Updated: 9/30/2021, 3:02:24 PM