Skip to main content

Authentication

The parry.gg API uses API keys for authentication. All API requests must include a valid API key.

Getting Your API Key

To create an API key:

  1. Log in to your account on parry.gg
  2. Navigate to your profile page by clicking your avatar in the upper right corner of the navbar
  3. Click the "API Keys" button in the Developer settings section
  4. Click "Create API Key" and give it a meaningful name
  5. Copy the generated key (it will only be visible once)

Using Your API Key

Include your API key in the X-API-KEY header of all requests:

X-API-KEY: YOUR_API_KEY

Using the @parry-gg/client

import { UserServiceClient, UpdateUserRequest, MutableUser } from '@parry-gg/client';

const client = new UserServiceClient('https://grpcweb.parry.gg');
const request = new UpdateUserRequest();
request.setId('user-id-here');

const user = new MutableUser();
user.setGamerTag('MyGamerTag');
user.setFirstName('John');
user.setLastName('Doe');
request.setUser(user);

// Authenticated API call with X-API-KEY
const response = await client.updateUser(request, {
'X-API-KEY': 'your-api-key-here'
});

API Key Best Practices

Security

  • Never expose API keys in client-side code or public repositories
  • Store securely in environment variables or secure configuration

Next Steps