> ## Documentation Index
> Fetch the complete documentation index at: https://docs.linkupapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting LinkedIn Authentication Token

> How to obtain the LinkedIn authentication token

To use most endpoints of the LinkUp API, you need a valid LinkedIn authentication token. Our authentication API provides the recommended approach to obtain this token.

## Using LinkUp Authentication API

Our authentication API provides the most reliable and secure way to obtain the LinkedIn token. This method automatically handles IP matching and security challenges.

### Important Note ⚠️

The login endpoint should be used sparingly. Once you obtain a valid  token, it remains valid for 365 days. You should:

* Store the token securely after first authentication
* Reuse the same token for all subsequent requests
* Only re-authenticate if the token becomes invalid

### Advantages:

1. **Automatic IP Handling**
   * Token is automatically configured to work with our proxy network
   * No need to worry about IP matching
   * Works seamlessly with all API endpoints

2. **Security Management**
   * Handles LinkedIn security challenges automatically
   * Manages verification codes when required
   * Reduces risk of account restrictions

### How to Use:

Read the Authentication part of our documentation for detailed instructions.

### Response Example:

```json theme={null}
{
  "status": "success",
  "message": "Login successful",
  "login_token": "XXXX..."  // Your LinkedIn token - valid for 365 days
}
```

## Best Practices

1. **Token Storage**
   * Store the token securely in your environment variables or secure storage
   * Never expose it in client-side code or version control
   * Implement proper access controls

2. **Usage Pattern**
   * Get the token once through our API
   * Store it securely
   * Reuse it for all requests until it expires (365 days)
   * Only re-authenticate if you get a 403 error

## Troubleshooting

Common issues and solutions:

1. **Token Invalid**
   * Check if the token has expired (after 365 days)
   * Verify token format is correct
   * Use the authentication API to get a new token

2. **Rate Limiting**
   * Avoid making login requests if you already have a valid token
   * Store and reuse the token instead of authenticating repeatedly

Need more help? Contact our support at [support@linkupapi.com](mailto:support@linkupapi.com)
