{"id":21421898,"url":"https://github.com/rlancer/apimarket-node-client","last_synced_at":"2025-03-16T20:14:53.195Z","repository":{"id":57103419,"uuid":"180647465","full_name":"rlancer/apimarket-node-client","owner":"rlancer","description":"Community supported, client library for AT\u0026T API Marketplace","archived":false,"fork":false,"pushed_at":"2019-05-07T20:28:01.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T21:04:35.424Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rlancer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-10T19:11:55.000Z","updated_at":"2019-05-07T20:28:02.000Z","dependencies_parsed_at":"2022-08-20T19:40:11.926Z","dependency_job_id":null,"html_url":"https://github.com/rlancer/apimarket-node-client","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlancer%2Fapimarket-node-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlancer%2Fapimarket-node-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlancer%2Fapimarket-node-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlancer%2Fapimarket-node-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rlancer","download_url":"https://codeload.github.com/rlancer/apimarket-node-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243926072,"owners_count":20369910,"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":[],"created_at":"2024-11-22T20:40:22.549Z","updated_at":"2025-03-16T20:14:53.157Z","avatar_url":"https://github.com/rlancer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"AT\u0026T API Marketplace - Community Nodejs Client \n---\n\n[![npm version](https://badge.fury.io/js/%40collaborizm%2Fapimarket.svg)](https://badge.fury.io/js/%40collaborizm%2Fapimarket)\n\nGet started with the new API Marketplace at \nhttps://apimarket.att.com\n\n**Clone the examples! https://github.com/rlancer/apimarket-examples**\n\n## Install \n`$ npm i @collaborizm/apimarket`\n\nBuilt with Typescript, types included! \n\n## Authentication\nLibrary automatically refreshes access tokens, no need to worry about testing for token expiration.\n ```javascript\n  import { APIMarketplaceClient } from '@collaborizm/apimarket'\n\n  // for user authentication \n  const apiMarketplaceClient = new APIMarketplaceClient({\n                                    username: '\u003cUSERNAME\u003e',\n                                    password: '\u003cPASSWORD\u003e',\n                                    grant_type: 'password',\n                                    client_id: '\u003cCLIENT_ID\u003e',\n                                    scope: 'openid'\n                                  })\n  \n  // for project authentication                                                           \n  const apiMarketplaceClient = new APIMarketplaceClient({\n                                    grant_type: 'client_credentials',\n                                    client_id: '\u003cCLIENT_ID\u003e',\n                                    client_secret: '\u003cCLIENT_SECRET\u003e',\n                                    scope: 'openid'\n                                  })\n  \n  // returns and object { id_token, access_token, id_token_decoded})          \n``` \n\n## Usage with API Marketplace Javascript SDK\n```javascript\n\n// Execute authentication on server\n\n// getValidToken will automatically refresh your access token if it's about to expire  \nconst tokenFromServer = await apiMarketplaceClient.getValidToken() \n\n// Include JS SDK included on client  \nconst kandy = Kandy.create({\n  logs: {\n    logLevel: 'debug'\n  },\n  authentication: {\n    server: {\n      base: 'oauth-cpaas.att.com'\n    },\n    clientCorrelator: 'sampleCorrelator'\n  }\n})\n\nconst { id_token, access_token } = authenticateProject\n\nthis.kandy.setTokens({ idToken: id_token, accessToken: access_token })\n``` \n\n## Simple send SMS message \nCreates a communication channel if one doesn't exist and sends an SMS \n```javascript\n  await apiMarketplaceClient.simpleSmsSend({\n    toAddress: '+15555555555',\n    fromAddress: '\u003cADDRESS_MUST_BE_PROVISIONED\u003e',\n    message: 'Hey',\n    callbackUrl: 'http://example.com/callback'\n  })\n```\n\n## REST API Methods \nIf you'd like to use any of the standard REST api methods, they're all here too\n\n```javascript\n  await apiMarketplaceClient.sendSMS({\n    toAddress: '+15555555555',\n    fromAddress: '\u003cADDRESS_MUST_BE_PROVISIONED\u003e',\n    message: 'Hey',\n    clientCorrelator: '\u003cFROM COMMUNICATION CHANNEL\u003e'\n  })\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlancer%2Fapimarket-node-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frlancer%2Fapimarket-node-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlancer%2Fapimarket-node-client/lists"}