apimatic-apollo-sdk
v0.0.1
Published
this is a sample SDK generated by APIMatic
Readme
Getting Started with apollo-rest-api
Introduction
The Apollo API provides programmatic access to Apollo, the all-in-one sales intelligence and engagement platform. Use it to enrich people and company data (individually or in bulk), search Apollo's database of over 240 million contacts and 30 million companies, and manage accounts, contacts, deals, sequences, tasks, calls, and conversations in your go-to-market workflows.
Base URL
All API requests are made to https://api.apollo.io/api/v1.
Authentication
- Apollo users authenticate with an API key passed in the
x-api-keyrequest header. See Create API Keys. - Apollo partners building integrations on behalf of mutual users authenticate with the OAuth 2.0 authorization flow.
Rate limits & credits
Rate limits and credit consumption depend on your Apollo pricing plan. Check your current limits and usage with the View API Usage Stats and Rate Limits endpoint. For more details, see Rate Limits and the API FAQs.
New to the API? Start with the Apollo API overview.
Install the Package
Run the following command from your project directory to install the package from npm:
npm install [email protected]For additional package details, see the Npm page for the [email protected] npm.
Initialize the API Client
Note: Documentation for the client can be found here.
The following parameters are configurable for the API Client:
| Parameter | Type | Description |
| --- | --- | --- |
| timeout | number | Timeout for API calls.Default: 30000 |
| httpClientOptions | Partial<HttpClientOptions> | Stable configurable http client options. |
| unstableHttpClientOptions | any | Unstable configurable http client options. |
| logging | PartialLoggingOptions | Logging Configuration to enable logging |
| apiKeyCredentials | ApiKeyCredentials | The credential object for apiKey |
| bearerAuthCredentials | BearerAuthCredentials | The credential object for bearerAuth |
The API client can be initialized as follows:
Code-Based Client Initialization
import { Client, LogLevel } from 'apimatic-apollo-sdk';
const client = new Client({
apiKeyCredentials: {
'x-api-key': 'x-api-key'
},
bearerAuthCredentials: {
accessToken: 'AccessToken'
},
timeout: 30000,
logging: {
logLevel: LogLevel.Info,
logRequest: {
logBody: true
},
logResponse: {
logHeaders: true
}
},
});Configuration-Based Client Initialization
import * as path from 'path';
import * as fs from 'fs';
import { Client } from 'apimatic-apollo-sdk';
// Provide absolute path for the configuration file
const absolutePath = path.resolve('./config.json');
// Read the configuration file content
const fileContent = fs.readFileSync(absolutePath, 'utf-8');
// Initialize client from JSON configuration content
const client = Client.fromJsonConfig(fileContent);See the Configuration-Based Client Initialization section for details.
Environment-Based Client Initialization
import * as dotenv from 'dotenv';
import * as path from 'path';
import * as fs from 'fs';
import { Client } from 'apimatic-apollo-sdk';
// Optional - Provide absolute path for the .env file
const absolutePath = path.resolve('./.env');
if (fs.existsSync(absolutePath)) {
// Load environment variables from .env file
dotenv.config({ path: absolutePath, override: true });
}
// Initialize client using environment variables
const client = Client.fromEnvironment(process.env);See the Environment-Based Client Initialization section for details.
Authorization
This API uses the following authentication schemes.
List of APIs
- Emailer Messages
- API
- Enrichment
- Search
- Accounts
- Contacts
- Deals
- Sequences
- Tasks
- Calls
- Conversations
- Analytics
- Miscellaneous
SDK Infrastructure
Configuration
- HttpClientOptions
- RetryConfiguration
- ProxySettings
- Configuration-Based Client Initialization
- Environment-Based Client Initialization
- PartialLoggingOptions
- PartialRequestLoggingOptions
- PartialResponseLoggingOptions
- LoggerInterface
