### List All Messages with Node.js SDK Source: https://developer.unipile.com/reference/messagescontroller_listallmessages Use the `unipile-node-sdk` to fetch all messages. Ensure you have installed the SDK using `npm install unipile-node-sdk`. Replace placeholders with your actual base URL and access token. ```node import { UnipileClient } from "unipile-node-sdk" const BASE_URL = "your base url" const ACCESS_TOKEN = "your access token" try { const client = new UnipileClient(BASE_URL, ACCESS_TOKEN) const response = await client.messaging.getAllMessages() } catch (error) { console.log(error) } ``` -------------------------------- ### Resynchronize Account Messaging Data with Node.js SDK Source: https://developer.unipile.com/reference/accountscontroller_resyncaccount Initiates a resynchronization of account messaging data using the unipile-node-sdk. Ensure you have the SDK installed and provide your base URL and access token. This example demonstrates fetching account data, which can be a precursor to or part of a resync operation. ```node import { UnipileClient } from "unipile-node-sdk" // SDK setup const BASE_URL = "your base url" const ACCESS_TOKEN = "your access token" // Inputs const account_id = "account id" try { const client = new UnipileClient(BASE_URL, ACCESS_TOKEN) const response = await client.account.getOne(account_id) } catch (error) { console.log(error) } ``` -------------------------------- ### List All Reactions with Node.js SDK Source: https://developer.unipile.com/reference/userscontroller_listallreactions Use this snippet to fetch all reactions from a user. Ensure you have the unipile-node-sdk installed and provide your base URL and access token. The identifier is the user's provider internal ID. ```node import { UnipileClient } from "unipile-node-sdk" // SDK setup const BASE_URL = "your base url" const ACCESS_TOKEN = "your access token" // Inputs const account_id = "account id" const identifier = "identifier" try { const client = new UnipileClient(BASE_URL, ACCESS_TOKEN) const response = await client.users.getAllPosts({ account_id, identifier, }) } catch (error) { console.log(error) } ``` -------------------------------- ### Get Calendar by ID Source: https://developer.unipile.com/reference/calendarscontroller_getcalendar Fetches a calendar's details using its unique identifier. This is a GET request to the /calendars/{id} endpoint. ```APIDOC ## GET /calendars/{id} ### Description Retrieves a specific calendar by its unique identifier. ### Method GET ### Endpoint /calendars/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the calendar to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the calendar. - **name** (string) - The name of the calendar. - **description** (string) - A description of the calendar. - **timezone** (string) - The timezone associated with the calendar. - **createdAt** (string) - The timestamp when the calendar was created. - **updatedAt** (string) - The timestamp when the calendar was last updated. #### Response Example { "id": "cal_12345", "name": "Team Meetings", "description": "Main calendar for team synchronization", "timezone": "UTC", "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:00:00Z" } ``` -------------------------------- ### List All Accounts with Node.js SDK Source: https://developer.unipile.com/reference/accountscontroller_listaccounts Use the Unipile Node.js SDK to fetch all linked accounts. Ensure you have your base URL and access token configured. ```node import { UnipileClient } from "unipile-node-sdk" const BASE_URL = "your base url" const ACCESS_TOKEN = "your access token" try { const client = new UnipileClient(BASE_URL, ACCESS_TOKEN) const response = await client.account.getAll() } catch (error) { console.log(error) } ``` -------------------------------- ### Get Job Offer OpenAPI Definition Source: https://developer.unipile.com/reference/linkedincontroller_getjobposting This OpenAPI definition outlines the GET request for retrieving a job offer. It specifies the endpoint, required parameters like job_id, service, and account_id, and the structure of the successful response. ```json { "openapi": "3.0.0", "paths": { "/api/v1/linkedin/jobs/{job_id}": { "get": { "operationId": "LinkedinController_getJobPosting", "summary": "Get job offer", "description": "Retrieve a job offer.", "parameters": [ { "name": "job_id", "required": true, "in": "path", "description": "The ID of the job offer.", "schema": { "type": "string" } }, { "name": "service", "required": true, "in": "query", "description": "The Linkedin service the job posting depends on.", "schema": { "enum": [ "CLASSIC", "RECRUITER" ], "type": "string" } }, { "name": "account_id", "required": true, "in": "query", "description": "The ID of the account to trigger the request from.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK. Request succeeded.", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "LinkedinJobPosting" ] }, "id": { "type": "string" }, "state": { "type": "string", "enum": [ "active", "draft", "review", "closed", "paused" ] }, "title": { "type": "string" }, "description": { "type": "string" }, "company": { "type": "string" }, "company_id": { "type": "string" }, "location": { "type": "string" }, "applicants_counter": { "type": "number" }, "views_counter": { "type": "number" }, "cost": { "type": "number" }, "created_at": { "type": "number" }, "published_at": { "type": "number" }, "closed_at": { "type": "number" }, "apply_url": { "type": "string" }, "screening_questions": { "type": "array", "items": { "type": "object", "properties": { "question": { "type": "string" }, "favorableAnswers": { "type": "array", "items": { "type": "string" } } }, "required": [ "question", "favorableAnswers" ] } }, "hiring_team": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "provider_id": { "anyOf": [ { "type": "string" }, { "nullable": true } ] }, "public_identifier": { "anyOf": [ { ``` -------------------------------- ### List All Folders with Node.js SDK Source: https://developer.unipile.com/reference/folderscontroller_listfolders Use this snippet to fetch all email folders for your account. Ensure you have the unipile-node-sdk installed and provide your base URL and access token. ```node import { UnipileClient } from "unipile-node-sdk" // SDK setup const BASE_URL = "your base url" const ACCESS_TOKEN = "your access token" try { const client = new UnipileClient(BASE_URL, ACCESS_TOKEN) const response = await client.email.getAllFolders() } catch (error) { console.log(error) } ``` -------------------------------- ### Start New Chat Source: https://developer.unipile.com/reference/chatscontroller_startnewchat Initiates a new chat conversation. This endpoint allows users to start a new chat, potentially with specific participants or initial messages. It also outlines common error responses that may occur. ```APIDOC ## POST /chats/start ### Description Initiates a new chat conversation. ### Method POST ### Endpoint /chats/start ### Request Body - **participants** (array) - Required - A list of user identifiers to include in the chat. - **initial_message** (string) - Optional - The first message to send in the chat. ### Response #### Success Response (200) - **chat_id** (string) - The unique identifier for the newly created chat. - **created_at** (string) - The timestamp when the chat was created. #### Response Example { "chat_id": "chat_12345", "created_at": "2023-10-27T10:00:00Z" } #### Error Responses - **400 Bad Request**: Indicates an issue with the request payload, such as missing required fields. - **403 Forbidden**: Returned if the user does not have the necessary permissions or subscription for the feature. - **404 Not Found**: Returned if a specified resource (e.g., a participant) does not exist. - **415 Unsupported Media Type**: Returned if the request uses an unsupported media type. - **422 Unprocessable Entity**: Returned for specific business logic errors, such as an unresolvable recipient. ``` -------------------------------- ### Create Account with Credentials Source: https://developer.unipile.com/reference/accountscontroller_createaccount Creates a new account using the provided provider, username, and password. This is the most straightforward method for account creation. ```APIDOC ## POST /accounts ### Description Creates a new account using the provided provider, username, and password. ### Method POST ### Endpoint /accounts ### Parameters #### Request Body - **provider** (string) - Required - Enum: ["MESSENGER"] - **username** (string) - Required - **password** (string) - Required - **user_agent** (string) - Optional - If encountering disconnection issues, enter the exact user agent of the browser on which the account has been connected. You can easily retrieve it in the browser's console with this command : "console.log(navigator.userAgent)" - **proxy** (object) - Optional - Proxy configuration for the connection. - **protocol** (string) - Enum: ["https", "http", "socks5"] - **port** (number) - Required - **host** (string) - Required - **username** (string) - Optional - Optional username for proxy’s authentication. - **password** (string) - Optional - Optional password for proxy’s authentication. - **messages** (object) - Optional - Either a UTC Datetime to start sync from, or a quantity of data. - **anyOf** (array) - Contains two possible types for messages: - **string** - An ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ). All links expire upon daily restart, regardless of their stated expiration date. A new link must be generated each time a user clicks on your app to connect. - **number** - The quantity of data that should be synced from data history. 0 will not sync history. ### Request Example { "provider": "MESSENGER", "username": "user@example.com", "password": "your_password", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", "proxy": { "protocol": "http", "port": 8080, "host": "127.0.0.1", "username": "proxy_user", "password": "proxy_pass" }, "messages": "2023-01-01T00:00:00.000Z" } ### Response #### Success Response (200) - **account_id** (string) - The unique identifier for the newly created account. #### Response Example { "account_id": "acc_12345abcde" } ``` -------------------------------- ### OpenAPI Definition for Get Company Profile Source: https://developer.unipile.com/reference/linkedincontroller_getcompanyprofile This OpenAPI definition outlines the GET request for retrieving a company profile. It specifies the endpoint, operation ID, parameters (account_id, identifier), and the expected JSON response schema for a successful request. ```json { "openapi": "3.0.0", "paths": { "/api/v1/linkedin/company/{identifier}": { "get": { "operationId": "LinkedinController_getCompanyProfile", "summary": "Retrieve a company profile", "description": "Get a company profile from its name or ID.", "parameters": [ { "name": "account_id", "required": true, "in": "query", "description": "The ID of the account to trigger the request from.", "schema": { "type": "string" } }, { "name": "identifier", "required": true, "in": "path", "description": "The identifier of the company: either the public identifier, the ID or the URN.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK. Request succeeded.", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "CompanyProfile" ] }, "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "entity_urn": { "type": "string" }, "public_identifier": { "type": "string" }, "profile_url": { "type": "string" }, "tagline": { "type": "string" }, "followers_count": { "type": "number" }, "is_following": { "type": "boolean" }, "is_employee": { "type": "boolean" }, "hashtags": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" } }, "required": [ "title" ] } }, "messaging": { "type": "object", "properties": { "is_enabled": { "type": "boolean" }, "id": { "type": "string" }, "entity_urn": { "type": "string" } }, "required": [ "is_enabled" ] }, "claimed": { "type": "boolean" }, "viewer_permissions": { "type": "object", "properties": { "canMembersInviteToFollow": { "type": "boolean" }, "canReadContentSuggestions": { "type": "boolean" }, "canReadMessages": { "type": "boolean" }, "canUpdateOrganizationProfile": { "type": "boolean" }, "canCreateOrganicShare": { "type": "boolean" }, "canReadAdminDashboard": { "type": "boolean" }, "canReadOrganizationActivity": { "type": "boolean" }, "canEditCurators": { "type": "boolean" }, "canManageOrganizationalPageFollow": { "type": "boolean" } } } } } } } } } } } } } ``` -------------------------------- ### List all reactions from a post using Node.js SDK Source: https://developer.unipile.com/reference/postscontroller_listallreactions Use this snippet to fetch all reactions for a given post ID. Ensure you have the unipile-node-sdk installed and your base URL and access token are correctly configured. The `account_id` and `post_id` are required inputs. ```node import { UnipileClient } from "unipile-node-sdk" // SDK setup const BASE_URL = "your base url" const ACCESS_TOKEN = "your access token" // Inputs const account_id = "account id" const post_id = "post id" try { const client = new UnipileClient(BASE_URL, ACCESS_TOKEN) const response = await client.users.getAllPostComments({ account_id, post_id, }) } catch (error) { console.log(error) } ``` -------------------------------- ### OpenAPI Definition for Get Hiring Project by ID Source: https://developer.unipile.com/reference/linkedincontroller_gethiringprojectbyid This OpenAPI 3.0.0 definition outlines the GET request for retrieving a hiring project by its ID. It specifies the endpoint, operation ID, parameters (account_id and id), and the structure of the successful response. ```json { "openapi": "3.0.0", "paths": { "/api/v1/linkedin/projects/{id}": { "get": { "operationId": "LinkedinController_getHiringProjectById", "summary": "Retrieve Recruiter hiring project from ID", "description": "Retrieve a particular hiring project.", "parameters": [ { "name": "account_id", "required": true, "in": "query", "description": "The ID of the account to trigger the request from.", "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "The ID of the hiring project.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK. Request succeeded.", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "RecruiterHiringProject" ] }, "id": { "type": "string" }, "name": { "type": "string" }, "owner_name": { "type": "string" }, "owner_id": { "type": "string" }, "created_at": { "type": "string" }, "job_posting": { "type": "object", "properties": { "id": { "type": "string" }, "state": { "type": "string", "enum": [ "active", "draft", "review", "closed", "paused" ] }, "title": { "type": "string" }, "description": { "type": "string" }, "company": { "type": "string" }, "company_id": { "type": "string" }, "location": { "type": "string" }, "applicants_counter": { "type": "number" }, "views_counter": { "type": "number" }, "cost": { "type": "number" }, "created_at": { "type": "number" }, "published_at": { "type": "number" }, "closed_at": { "type": "number" }, "apply_url": { "type": "string" }, "screening_questions": { "type": "array", "items": { "type": "object", "properties": { "question": { "type": "string" }, "favorableAnswers": { "type": "array", "items": { "type": "string" } } }, "required": [ "question", "favorableAnswers" ] } }, "hiring_team": { "type": "array", "items": { "type": "object" } } } } } } } } } } } } } } ``` -------------------------------- ### Node.js SDK: Create Hosted Auth Link Source: https://developer.unipile.com/reference/hostedcontroller_requestlink Use this snippet to generate a URL for Unipile's hosted authentication. Ensure the Unipile Node.js SDK is installed and configured with your base URL and access token. The `providers` parameter can be set to "*" to allow all providers. ```node import { UnipileClient } from "unipile-node-sdk" // SDK setup const BASE_URL = "your base url" const ACCESS_TOKEN = "your access token" // Inputs const type = "create" const providers = "*" const api_url = "url of your Unipile server" const expiresOn = "a datetime (YYYY-MM-DDTHH:MM:SS.sssZ)" try { const client = new UnipileClient(BASE_URL, ACCESS_TOKEN) const response = await client.account.createHostedAuthLink({ type, providers, api_url, expiresOn, }) } catch (error) { console.log(error) } ``` -------------------------------- ### Get Mail Source: https://developer.unipile.com/reference/mailscontroller_getmail Retrieves details of a specific mail. ```APIDOC ## GET /mails/{mail_id} ### Description Retrieves the details of a specific mail using its unique identifier. ### Method GET ### Endpoint /mails/{mail_id} ### Parameters #### Path Parameters - **mail_id** (string) - Required - The unique identifier of the mail to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the mail. - **subject** (string) - The subject line of the mail. - **body** (string) - The content of the mail. - **from** (object) - Information about the sender. - **display_name** (string) - The display name of the sender. - **identifier** (string) - The identifier of the sender. - **identifier_type** (string) - The type of the sender's identifier (e.g., EMAIL_ADDRESS). - **to_attendees** (array) - A list of recipients. - **display_name** (string) - The display name of the recipient. - **identifier** (string) - The identifier of the recipient. - **identifier_type** (string) - The type of the recipient's identifier. - **cc_attendees** (array) - A list of CC recipients. - **display_name** (string) - The display name of the CC recipient. - **identifier** (string) - The identifier of the CC recipient. - **identifier_type** (string) - The type of the CC recipient's identifier. - **bcc_attendees** (array) - A list of BCC recipients. - **display_name** (string) - The display name of the BCC recipient. - **identifier** (string) - The identifier of the BCC recipient. - **identifier_type** (string) - The type of the BCC recipient's identifier. - **reply_to_attendees** (array) - A list of reply-to recipients. - **display_name** (string) - The display name of the reply-to recipient. - **identifier** (string) - The identifier of the reply-to recipient. - **identifier_type** (string) - The type of the reply-to recipient's identifier. #### Response Example { "id": "mail_123", "subject": "Meeting Reminder", "body": "Hi team, just a reminder about our meeting tomorrow.", "from": { "display_name": "Alice", "identifier": "alice@example.com", "identifier_type": "EMAIL_ADDRESS" }, "to_attendees": [ { "display_name": "Bob", "identifier": "bob@example.com", "identifier_type": "EMAIL_ADDRESS" } ], "cc_attendees": [], "bcc_attendees": [], "reply_to_attendees": [] } ``` -------------------------------- ### Create Account Source: https://developer.unipile.com/reference/accountscontroller_createaccount Creates a new account and links it to Unipile. Supports various providers like Twitter. ```APIDOC ## POST /accounts ### Description Creates a new account and links it to Unipile. Supports various providers like Twitter. ### Method POST ### Endpoint /accounts ### Request Body - **provider** (string) - Required - The provider of the account (e.g., "TWITTER"). - **username** (string) - Required - The username for the account. - **email** (string) - Required - The email address for the account. - **password** (string) - Required - The password for the account. - **country** (string) - Optional - An ISO 3166-1 A-2 country code to be set as proxy's location. - **ip** (string) - Optional - An IPv4 address to infer proxy's location. - **disabled_features** (array) - Optional - An array of features that should be disabled for this account. ### Request Example ```json { "provider": "TWITTER", "username": "example_user", "email": "user@example.com", "password": "your_password", "country": "US", "disabled_features": [ "linkedin_recruiter" ] } ``` ### Response #### Success Response (201) - **object** (string) - Indicates the type of object created, should be "AccountCreated". - **account_id** (string) - A unique identifier for the created account. #### Response Example ```json { "object": "AccountCreated", "account_id": "acc_12345abcde" } ``` #### Error Responses - **400 Bad Request**: Indicates invalid or missing parameters, malformed requests, content too large, too many characters, unescaped characters, invalid actions, or invalid labels. The response body will contain details about the error type and instance. ``` -------------------------------- ### Retrieve Post with Node.js SDK Source: https://developer.unipile.com/reference/postscontroller_getpost Use the `getPost` method from the Unipile Node.js SDK to fetch post details. Ensure you have the SDK installed and provide valid account and post IDs. The `post_id` format may vary depending on the social platform. ```javascript import { UnipileClient } from "unipile-node-sdk" // SDK setup const BASE_URL = "your base url" const ACCESS_TOKEN = "your access token" // Inputs const account_id = "account id" const post_id = "post id" try { const client = new UnipileClient(BASE_URL, ACCESS_TOKEN) const response = await client.users.getPost({ account_id, post_id, }) } catch (error) { console.log(error) } ``` -------------------------------- ### Get Chat Source: https://developer.unipile.com/reference/chatscontroller_getchat Retrieves a specific chat conversation by its ID. ```APIDOC ## GET /chats/{chatId} ### Description Retrieves a specific chat conversation. ### Method GET ### Endpoint /chats/{chatId} ### Parameters #### Path Parameters - **chatId** (string) - Required - The unique identifier of the chat to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the chat. - **type** (string) - The type of the chat. - **status** (string) - The current status of the chat. #### Error Responses - **403 Forbidden**: Returned if the user lacks the necessary permissions, the account is restricted, there's an account mismatch, an unknown authentication context, session mismatch, the feature is not subscribed, a subscription is required, resource access is restricted, or an action is required. - **404 Not Found**: Returned if the specified chat resource is not found or an invalid resource identifier is provided. - **500 Internal Server Error**: Returned for unexpected errors, provider issues, or authentication intent errors. ``` -------------------------------- ### OpenAPI Definition for Get Job Applicant Resume Source: https://developer.unipile.com/reference/linkedincontroller_getjobapplicantresume This OpenAPI 3.0.0 definition specifies the GET endpoint for downloading a job applicant's resume. It includes parameters for applicant ID, service type, and account ID, as well as detailed responses for success and various error conditions. ```json { "openapi": "3.0.0", "paths": { "/api/v1/linkedin/jobs/applicants/{applicant_id}/resume": { "get": { "operationId": "LinkedinController_getJobApplicantResume", "summary": "Download the resume of a job applicant", "description": "This route can be used to download the resume of a job applicant.", "parameters": [ { "name": "service", "required": false, "in": "query", "description": "The Linkedin service the applicant depends on. Default is classic.", "schema": { "enum": [ "CLASSIC", "RECRUITER" ], "type": "string" } }, { "name": "applicant_id", "required": true, "in": "path", "description": "The ID of the job applicant.", "schema": { "type": "string" } }, { "name": "account_id", "required": true, "in": "query", "description": "The ID of the account to trigger the request from.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK. Request succeeded.", "content": { "application/json": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "## Unauthorized\n\n### Missing credentials - Type: \"errors/missing_credentials\"\nSome credentials are necessary to perform the request.\n\n### Multiple sessions - Type: \"errors/multiple_sessions\"\nLinkedIn limits the use of multiple sessions on certain Recruiter accounts. This error restricts access to this route only, but causing a popup to appear in the user's browser, prompting them to choose a session, which can disconnect the current account. To avoid this error, use the cookie connection method.\n\n### Wrong account - Type: \"errors/wrong_account\"\nThe provided credentials do not match the correct account.\n\n### Invalid credentials - Type: \"errors/invalid_credentials\"\nThe provided credentials are invalid.\n\n### Invalid proxy credentials - Type: \"errors/invalid_proxy_credentials\"\nThe provided proxy credentials are invalid.\n\n### Invalid IMAP configuration - Type: \"errors/invalid_imap_configuration\"\nThe provided IMAP configuration is invalid.\n\n### Invalid SMTP configuration - Type: \"errors/invalid_smtp_configuration\"\nThe provided SMTP configuration is invalid.\n\n### Invalid checkpoint solution - Type: \"errors/invalid_checkpoint_solution\"\nThe checkpoint resolution did not pass successfully. Please retry.\n\n### Checkpoint error - Type: \"errors/checkpoint_error\"\nThe checkpoint does not appear to be resolvable. Please try again and contact support if the problem persists.\n\n### Expired credentials - Type: \"errors/expired_credentials\"\nInvalid credentials. Please check your username and password and try again.\n\n### Expired link - Type: \"errors/expired_link\"\nThis link has expired. Please return to the application and generate a new one.\n\n### Insufficient privileges - Type: \"errors/insufficient_privileges\"\nThis resource seems to be out of your scopes.\n\n### Disconnected account - Type: \"errors/disconnected_account\"\nThe account appears to be disconnected from the provider service.\n\n### Disconnected feature - Type: \"errors/disconnected_feature\"\nThe service you\'re trying to reach appears to be disconnected.", "content": { "application/json": { "schema": { "title": "UnauthorizedResponse", "type": "object", "properties": { "title": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "type": { "type": "string", "enum": [ "errors/missing_credentials", "errors/multiple_sessions", "errors/invalid_checkpoint_solution", "errors/invalid_proxy_credentials", "errors/checkpoint_error", "errors/invalid_credentials", "errors/expired_credentials", "errors/expired_link", "errors/invalid_imap_configuration", "errors/invalid_smtp_configuration", "errors/disconnected_account", "errors/disconnected_feature", "errors/insufficient_privileges", "errors/wrong_account" ] } } } } } } } } } } } ``` -------------------------------- ### Add Reaction to Post (Node.js SDK) Source: https://developer.unipile.com/reference/postscontroller_addpostreaction Use the Unipile Node.js SDK to send a reaction to a post. Ensure you have the SDK installed and your base URL and access token are configured. ```node import { UnipileClient } from "unipile-node-sdk" // SDK setup const BASE_URL = "your base url" const ACCESS_TOKEN = "your access token" // Inputs const account_id = "account id" const post_id = "post id" try { const client = new UnipileClient(BASE_URL, ACCESS_TOKEN) const response = await client.users.sendPostReaction({ account_id, post_id, }) } catch (error) { console.log(error) } ``` -------------------------------- ### Get Mail Source: https://developer.unipile.com/reference/mailscontroller_getmail Retrieves mail information based on the provided identifier and type. ```APIDOC ## GET /mails/{identifier} ### Description Retrieves mail information based on the provided identifier and type. ### Method GET ### Endpoint /mails/{identifier} ### Parameters #### Path Parameters - **identifier** (string) - Required - The unique identifier for the mail. - **identifier_type** (string) - Required - The type of the identifier (e.g., EMAIL_ADDRESS, THREAD_ID). ### Response #### Success Response (200) - **message_id** (string) - The unique ID of the message. - **subject** (string) - The subject of the mail. - **body** (string) - The content of the mail. - **from** (object) - Information about the sender. - **display_name** (string) - The display name of the sender. - **profile_picture** (string) - URL to the sender's profile picture. - **identifier** (string) - The sender's identifier. - **identifier_type** (string) - The type of the sender's identifier. - **to_attendees** (array) - A list of recipients. - **display_name** (string) - The display name of the recipient. - **profile_picture** (string) - URL to the recipient's profile picture. - **identifier** (string) - The recipient's identifier. - **identifier_type** (string) - The type of the recipient's identifier. - **cc_attendees** (array) - A list of CC recipients. - **display_name** (string) - The display name of the CC recipient. - **profile_picture** (string) - URL to the CC recipient's profile picture. - **identifier** (string) - The CC recipient's identifier. - **identifier_type** (string) - The type of the CC recipient's identifier. - **bcc_attendees** (array) - A list of BCC recipients. - **display_name** (string) - The display name of the BCC recipient. - **profile_picture** (string) - URL to the BCC recipient's profile picture. - **identifier** (string) - The BCC recipient's identifier. - **identifier_type** (string) - The type of the BCC recipient's identifier. #### Response Example { "message_id": "msg_12345", "subject": "Meeting Update", "body": "Hi team, please find the updated meeting minutes attached.", "from": { "display_name": "Alice", "profile_picture": "http://example.com/alice.jpg", "identifier": "alice@example.com", "identifier_type": "EMAIL_ADDRESS" }, "to_attendees": [ { "display_name": "Bob", "profile_picture": "http://example.com/bob.jpg", "identifier": "bob@example.com", "identifier_type": "EMAIL_ADDRESS" } ], "cc_attendees": [], "bcc_attendees": [] } ``` -------------------------------- ### Create Account Source: https://developer.unipile.com/reference/accountscontroller_createaccount Creates a new account with the provided details. This is the primary method for users to onboard. ```APIDOC ## POST /accounts ### Description Creates a new user account. ### Method POST ### Endpoint /accounts ### Request Body - **username** (string) - Required - The desired username for the new account. - **email** (string) - Required - The email address for the account. - **password** (string) - Required - The password for the account. ### Request Example { "username": "newuser", "email": "newuser@example.com", "password": "securepassword123" } ### Response #### Success Response (201) - **accountId** (string) - The unique identifier for the newly created account. - **message** (string) - A confirmation message. #### Response Example { "accountId": "acc_12345abcde", "message": "Account created successfully." } #### Error Response (400) - **error** (string) - A description of the error (e.g., "Username already exists", "Invalid email format"). #### Response Example { "error": "Username already exists." } ``` -------------------------------- ### Proxy Configuration Source: https://developer.unipile.com/reference/hostedcontroller_requestlink Configure proxy settings for the Unipile hosted controller. This includes specifying the protocol, port, host, and optional authentication credentials. ```APIDOC ## Proxy Configuration ### Description Configure proxy settings for the Unipile hosted controller. This includes specifying the protocol, port, host, and optional authentication credentials. ### Object `proxy` ### Properties - **protocol** (string) - Enum: ["https", "http", "socks5"] - The protocol for the proxy connection. - **port** (number) - Required - The port number for the proxy server. - **host** (string) - Required - The hostname or IP address of the proxy server. - **username** (string) - Optional - Username for proxy authentication. - **password** (string) - Optional - Password for proxy authentication. ``` -------------------------------- ### Get Mail Source: https://developer.unipile.com/reference/mailscontroller_getmail Retrieves mail based on the provided folder and other optional parameters. ```APIDOC ## GET /mail ### Description Retrieves a list of emails from a specified folder. Supports filtering by message ID, provider ID, and read date. ### Method GET ### Endpoint /mail ### Parameters #### Query Parameters - **folder** (string) - Required - The folder to retrieve mail from. Possible values: "inbox", "sent", "archive", "drafts", "trash", "spam", "all", "important", "starred", "unknown". - **message_id** (string) - Optional - Filters mail by a specific message ID. - **provider_id** (string) - Optional - Filters mail by a specific provider ID. - **read_date** (string) - Optional - Filters mail by read date in ISO 8601 UTC format (YYYY-MM-DDTHH:MM:SS.sssZ). ### Response #### Success Response (200) - **message_id** (string) - The unique identifier for the message. - **provider_id** (string) - The identifier for the message provider. - **from_attendee** (object) - Information about the sender. - **display_name** (string) - The display name of the sender. - **profile_picture** (string) - URL to the sender's profile picture. - **identifier** (string) - The sender's identifier. - **identifier_type** (string) - The type of the sender's identifier (e.g., "EMAIL_ADDRESS"). - **folders** (array) - List of folders the message belongs to. - **folderIds** (array) - List of folder IDs the message belongs to. - **read_date** (string) - The date and time the message was read in ISO 8601 UTC format. ``` -------------------------------- ### Retrieve User Profile with Node.js SDK Source: https://developer.unipile.com/reference/userscontroller_getprofilebyidentifier Use the Unipile Node.js SDK to fetch a user's profile by their account ID and identifier. Ensure you have set up the SDK with your base URL and access token. This method can be subject to provider limits and restrictions. ```node import { UnipileClient } from "unipile-node-sdk" // SDK setup const BASE_URL = "your base url" const ACCESS_TOKEN = "your access token" // Inputs const account_id = "account id" const identifier = "identifier" try { const client = new UnipileClient(BASE_URL, ACCESS_TOKEN) const response = await client.users.getProfile({ account_id, identifier, }) } catch (error) { console.log(error) } ``` -------------------------------- ### Get Job Applicant Source: https://developer.unipile.com/reference/linkedincontroller_getjobapplicant Retrieves detailed information for a specific job applicant. ```APIDOC ## GET /linkedin/job/applicant ### Description Retrieves detailed information for a specific job applicant, including their profile, work experience, education, and screening questions. ### Endpoint /linkedin/job/applicant ### Parameters #### Query Parameters - **id** (string) - Required - The unique identifier of the job applicant. - **profile_id** (string) - Required - The unique identifier of the applicant's profile. - **public_identifier** (string) - Required - The public identifier of the applicant's profile. ### Response #### Success Response (200) - **object** (string) - The type of the object returned. - **id** (string) - The unique identifier of the job applicant. - **profile_id** (string) - The unique identifier of the applicant's profile. - **public_identifier** (string) - The public identifier of the applicant's profile. - **public_profile_url** (string) - The URL to the applicant's public profile. - **name** (string) - The full name of the applicant. - **location** (string) - The location of the applicant. - **headline** (string) - The applicant's professional headline. - **applied_at** (string) - The date and time the applicant applied. - **rating** (number) - The applicant's rating. - **work_experience** (array) - An array of the applicant's work experience. - **company_name** (string) - The name of the company. - **title** (string) - The job title. - **start** (string) - The start date of employment. - **end** (string) - The end date of employment. - **location** (string) - The location of the job. - **description** (string) - A description of the role. - **education** (array) - An array of the applicant's education. - **school** (string) - The name of the educational institution. - **degree** (string) - The degree obtained. - **start** (string) - The start date of education. - **end** (string) - The end date of education. - **description** (string) - A description of the education. - **screening_questions** (array) - An array of screening questions and answers. - **question** (string) - The screening question. - **answers** (array) - An array of possible answers. - **success** (boolean) - Indicates if the answer was successful. #### Response Example { "example": "{\"object\": \"job_applicant\", \"id\": \"applicant_123\", \"profile_id\": \"profile_abc\", \"public_identifier\": \"john-doe-12345\", \"public_profile_url\": \"https://www.linkedin.com/in/johndoe12345\", \"name\": \"John Doe\", \"location\": \"San Francisco, CA\", \"headline\": \"Software Engineer at Tech Corp\", \"applied_at\": \"2023-10-27T10:00:00Z\", \"rating\": 4.5, \"work_experience\": [{\"company_name\": \"Tech Corp\", \"title\": \"Software Engineer\", \"start\": \"2020-01-01\", \"end\": \"2023-12-31\", \"location\": \"San Francisco, CA\", \"description\": \"Developed and maintained web applications.\"}], \"education\": [{\"school\": \"University of Example\", \"degree\": \"B.S. in Computer Science\", \"start\": \"2016-09-01\", \"end\": \"2020-05-31\", \"description\": \"Graduated with honors.\"}], \"screening_questions\": [{\"question\": \"Do you have experience with Python?\", \"answers\": [\"Yes\", \"No\"], \"success\": true}]}"" } #### Error Response (400) - **title** (string) - The error title. - **detail** (string) - A detailed description of the error. - **instance** (string) - The specific instance of the error. - **type** (string) - The type of error. - **status** (number) - The HTTP status code. #### Error Response (401) - **title** (string) - The error title. - **detail** (string) - A detailed description of the error. - **instance** (string) - The specific instance of the error. - **type** (string) - The type of error. ```