{"id":18384633,"url":"https://github.com/speakeasy-sdks/attentive-node-sdk","last_synced_at":"2025-04-11T23:48:47.668Z","repository":{"id":135629944,"uuid":"598421787","full_name":"speakeasy-sdks/attentive-node-sdk","owner":"speakeasy-sdks","description":"Node SDK for Attentive API","archived":false,"fork":false,"pushed_at":"2024-04-02T21:12:36.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T23:48:44.250Z","etag":null,"topics":["attentive","commerce","messaging","sdk","sdk-node"],"latest_commit_sha":null,"homepage":"https://docs.attentive.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/speakeasy-sdks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-02-07T04:17:38.000Z","updated_at":"2023-02-07T04:35:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"4c728d90-39b3-4db2-9e45-4c2669d27e0f","html_url":"https://github.com/speakeasy-sdks/attentive-node-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fattentive-node-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fattentive-node-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fattentive-node-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fattentive-node-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/speakeasy-sdks","download_url":"https://codeload.github.com/speakeasy-sdks/attentive-node-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497891,"owners_count":21113983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["attentive","commerce","messaging","sdk","sdk-node"],"created_at":"2024-11-06T01:14:57.809Z","updated_at":"2025-04-11T23:48:47.639Z","avatar_url":"https://github.com/speakeasy-sdks.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Attentive Node SDK\n\n[Attentive’s APIs](https://docs.attentive.com/) allow you as a developer to integrate with the Attentive platform and build custom applications. Use our numerous endpoints to manage user subscriptions, trigger messages related to user actions, save subscriber attributes, and send personalized text messages.\n\n\u003c!-- Start SDK Installation --\u003e\n## SDK Installation\n\n### NPM\n\n```bash\nnpm add @attentive/sdk\n```\n\n### Yarn\n\n```bash\nyarn add @attentive/sdk\n```\n\u003c!-- End SDK Installation --\u003e\n\n## Authentication\n\nAuthentication\nTo keep data on Attentive’s platform safe and secure, all apps connecting with Attentive’s APIs must authenticate when making API requests. This article describes the different methods of authenticating and authorizing apps with Attentive’s platform.\n\nTypes of authentication\nDifferent types of apps require different authentication or authorization methods:\n\nPrivate apps use basic HTTP authentication.\nPublic apps use OAuth 2.0.\n\nHTTP authentication\nPrivate applications can authenticate through basic HTTP authentication by using their API key as the Bearer Token when making calls to Attentive’s APIs. To generate a unique API key, you must create an app in the Attentive platform. You should treat your API key as a password. If it is accidentally shared, other users may be able to send messages to customers on your behalf. Use the /me endpoint to verify that you are authenticating correctly.\n\nFor a GraphQL API example:\n\n```bash\ncurl --location --request POST 'https://api.attentivemobile.com/v1/graphql' \\\n--header 'Authorization: Bearer \u003cUnique API Key\u003e' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\"query\":\"\\nquery {\\n  viewer {\\n    installedApplication {\\n      installerCompany {\\n          id\\n          name\\n      }\\n    }\\n  }\\n}\\n\\n\",\"variables\":{}}'\n```\n\nFor a REST API example:\n\n```bash\ncurl 'https://api.attentivemobile.com/v1/me' \\\n -X GET \\\n -H 'Authorization: Bearer \u003cUnique API Key\u003e' \\\n -H 'Content-Type: application/json' \\\n ```\n\nNote: If you are unable to access the Attentive platform, please send an email to api-tokens@attentivemobile.com for access.\n\n## SDK Example Usage\n\u003c!-- Start SDK Example Usage --\u003e\n```typescript\nimport { SDK, withSecurity} from \"@attentive/sdk\";\nimport { CreateTokenViaAuthorizationCodeRequest, CreateTokenViaAuthorizationCodeResponse } from \"@attentive/sdk/src/sdk/models/operations\";\nimport { AxiosError } from \"axios\";\n\nconst sdk = new SDK(withSecurity(\n  security: {\n    oAuthFlow: {\n      authorization: \"Bearer YOUR_ACCESS_TOKEN_HERE\",\n    },\n  }\n));\n    \nconst req: CreateTokenViaAuthorizationCodeRequest = {\n  request: {\n    clientId: \"sit\",\n    clientSecret: \"voluptas\",\n    code: \"culpa\",\n    grantType: \"expedita\",\n    redirectUri: \"consequuntur\",\n  },\n};\n\nsdk.accessToken.createTokenViaAuthorizationCode(req).then((res: CreateTokenViaAuthorizationCodeResponse | AxiosError) =\u003e {\n   // handle response\n});\n```\n\u003c!-- End SDK Example Usage --\u003e\n\n\u003c!-- Start SDK Available Operations --\u003e\n## SDK Available Operations\n\n### Access Token\n\n* `createTokenViaAuthorizationCode` - Access Token\n\n### Custom Attributes\n\n* `postCustomAttributes` - Custom Attributes\n\n### Custom Events\n\n* `postCustomEvents` - Custom Events\n\n### Identity\n\n* `identify` - Add a client user identifier or custom identifier(s) to a user\n\n### Privacy Request\n\n* `addDeleteRequest` - Sending a request to this endpoint will delete a subscriber in accordance with CCPA regulations within thirty days provided the call was successful.\n* `getDeleteRequest` - Get a CCPA delete request by Id\n\n### Product Catalog\n\n* `getUploads` - View Recent Catalog Uploads\n* `lookupUpload` - Lookup Product Catalog Ingestion\n* `postUpload` - Upload Product Catalog\n\n### Subscribers\n\n* `addSubscriptions` - Subscribe user\n* `getSubscriptions` - Get subscription eligibility for a user\n* `unsubscribeSubscriptions` - Unsubscribe subscriptions for a user\n\n### Test Authentication\n\n* `getMe` - Me\n\n### Webhooks\n\n* `createWebhook` - Create webhook\n* `deleteWebhook` - Delete webhook\n* `getWebhooks` - List webhooks\n* `updateWebhook` - Update webhook\n\n### eCommerce\n\n* `postAddToCartEvents` - Add to cart\n* `postProductViewEvents` - Product view\n* `postPurchaseEvents` - Purchase\n\n\u003c!-- End SDK Available Operations --\u003e\n\n### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-sdks%2Fattentive-node-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspeakeasy-sdks%2Fattentive-node-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-sdks%2Fattentive-node-sdk/lists"}