Skip to content
Back to skills

Grammarly Install Auth

ASecurity

'Install and configure Grammarly SDK/CLI authentication.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
securitytypescriptbashapi

Works with

  • claude code
  • cli
  • api

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add pauldx/claudifying --skill grammarly-install-auth --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Grammarly Install Auth?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Grammarly Install Auth
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pauldx-grammarly-install-auth/badge)](https://www.skillsdirectory.com/skills/pauldx-grammarly-install-auth)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: grammarly-install-auth
description: 'Install and configure Grammarly SDK/CLI authentication.

  Use when setting up a new Grammarly integration, configuring API keys,

  or initializing Grammarly in your project.

  Trigger with phrases like "install grammarly", "setup grammarly",

  "grammarly auth", "configure grammarly API key".

  '
allowed-tools: Read, Write, Edit, Bash(npm:*), Bash(curl:*), Grep
version: 1.0.0
license: MIT
tags:
- saas
- grammarly
- writing
compatibility: Designed for Claude Code
---
# Grammarly Install & Auth

## Overview

Configure Grammarly API authentication using OAuth 2.0 Bearer tokens. Grammarly provides three main APIs: Writing Score API, AI Detection API, and Plagiarism Detection API. All use the same auth pattern via `api.grammarly.com`.

## Prerequisites

- Grammarly Enterprise account with API access
- OAuth credentials from Grammarly admin portal
- Required scopes: `scores-api:read`, `scores-api:write`

## Instructions

### Step 1: Configure Environment

```bash
# .env (NEVER commit)
GRAMMARLY_CLIENT_ID=your_client_id
GRAMMARLY_CLIENT_SECRET=your_client_secret
GRAMMARLY_ACCESS_TOKEN=  # Populated after OAuth
```

### Step 2: Obtain Access Token

```typescript
// auth.ts
import 'dotenv/config';

async function getAccessToken(): Promise<string> {
  const response = await fetch('https://api.grammarly.com/ecosystem/api/v1/oauth/token', {
    method: 'POST',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    body: new URLSearchParams({
      grant_type: 'client_credentials',
      client_id: process.env.GRAMMARLY_CLIENT_ID!,
      client_secret: process.env.GRAMMARLY_CLIENT_SECRET!,
    }),
  });
  const { access_token, expires_in } = await response.json();
  console.log(`Token obtained, expires in ${expires_in}s`);
  return access_token;
}
```

### Step 3: Verify Connection

```typescript
async function verify(token: string) {
  const response = await fetch('https://api.grammarly.com/ecosystem/api/v2/scores', {
    method: 'POST',
    headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
    body: JSON.stringify({ text: 'This is a test sentence for verification.' }),
  });
  if (response.ok) console.log('Grammarly API connection verified');
  else console.error('Verification failed:', response.status);
}
```

## Error Handling

| Error | Cause | Solution |
|-------|-------|----------|
| `401 Unauthorized` | Invalid or expired token | Re-authenticate |
| `403 Forbidden` | Missing API scopes | Check enterprise admin settings |
| `invalid_client` | Wrong credentials | Verify client ID and secret |

## Resources

- [Grammarly Developer Portal](https://developer.grammarly.com/)
- [Your First API Request](https://developer.grammarly.com/your-first-api-request.html)
- [API Support](https://developer.grammarly.com/docs/support)

## Next Steps

After auth, proceed to `grammarly-hello-world`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.