{"id":22253050,"url":"https://github.com/plusauth/plusauth-rest-js","last_synced_at":"2025-07-28T05:32:21.282Z","repository":{"id":132678224,"uuid":"285249635","full_name":"PlusAuth/plusauth-rest-js","owner":"PlusAuth","description":"PlusAuth Rest Client for JavaScript applications","archived":false,"fork":false,"pushed_at":"2025-07-23T09:28:50.000Z","size":5900,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-23T11:31:06.840Z","etag":null,"topics":["plusauth","rest-api","rest-client","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"https://docs.plusauth.com/api/core","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PlusAuth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-08-05T10:01:11.000Z","updated_at":"2025-07-23T09:28:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6a29646-4190-4fa1-84b8-e4e27c8962b3","html_url":"https://github.com/PlusAuth/plusauth-rest-js","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/PlusAuth/plusauth-rest-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlusAuth%2Fplusauth-rest-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlusAuth%2Fplusauth-rest-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlusAuth%2Fplusauth-rest-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlusAuth%2Fplusauth-rest-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PlusAuth","download_url":"https://codeload.github.com/PlusAuth/plusauth-rest-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlusAuth%2Fplusauth-rest-js/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267468274,"owners_count":24092312,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["plusauth","rest-api","rest-client","typescript","typescript-library"],"created_at":"2024-12-03T07:16:02.593Z","updated_at":"2025-07-28T05:32:21.267Z","avatar_url":"https://github.com/PlusAuth.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @plusauth/plusauth-rest-js\n\nHelper library for interacting with PlusAuth REST API intent upon to be used in NodeJS and browser environments.\n\nTable Of Content\n1. [Installation](#installation)\n2. [Usage](#usage)\n3. [Docs](#docs)\n4. [Examples](#examples)\n\n\n# Installation\nFrom PlusAuth CDN:\n```html\n\u003c!-- Latest release --\u003e\n\u003cscript src=\"https://unpkg.com/@plusauth/plusauth-rest-js@2.2.0/dist/plusauth-rest-js.min.js\"\u003e\u003c/script\u003e\n```\n\nWith npm:\n```shell script\n$ npm install @plusauth/plusauth-rest-js\n```\n\nor with yarn\n```shell script\n$ yarn add @plusauth/plusauth-rest-js\n```\n\n# Usage\n\n## CDN Usage\nThe library will be exposed to global as `PlusAuthRestClient`\n\nInitialize it like following:\n```js\nconst authToken = '\u003cACCESS_TOKEN\u003e'\nconst plusAuth = PlusAuthRestClient('https://\u003cYOUR_TENANT_ID\u003e.plusauth.com', { token: authToken })\n```\n\n## NPM Usage\n```js\nimport { PlusAuthRestClient } from '@plusauth/plusauth-rest-js'\n\nconst authToken = '\u003cACCESS_TOKEN\u003e'\nconst plusAuth = new PlusAuthRestClient('https://\u003cYOUR_TENANT_ID\u003e.plusauth.com', { token: authToken })\n```\n\n## CommonJS\n```js\nconst { PlusAuthRestClient } = require('@plusauth/plusauth-rest-js')\n\nconst authToken = '\u003cACCESS_TOKEN\u003e'\nconst plusAuth = new PlusAuthRestClient('https://\u003cYOUR_TENANT_ID\u003e.plusauth.com', { token: authToken })\n```\n\n## Replacing Token\nGenerally you may need to replace PlusAuth REST API token because its lifetime could end.\nIn this case updating `options.token` or by using the `token` setter\nof PlusAuthClient instance will be enough to change used token.\n\n\u003e To generate access token consult [docs](https://docs.plusauth.com/api/core/authorization) or have a look at [example/getAuthToken.js](./example/getAuthToken.js).\nThe example file also includes an example curl request.\n\n```js\nconst initialToken = 'INITIAL_TOKEN'\nconst plusAuth = new PlusAuthRestClient('https://\u003cYOUR_TENANT_ID\u003e.plusauth.com', { token: initialToken })\n\nplusAuth.users.getAll().then( function (res){\n// retrieved with initial token\nconsole.log(res)\n})\n\n// or: plusauth.options.token = 'NEW_TOKEN'\nplusAuth.token = 'NEW_TOKEN'\n\nplusAuth.users.getAll().then(function (res){\n// Retrieved with new token\nconsole.log(res)\n})\n```\n\n## Custom HTTP Client\nYou may provide your own http client to the library when you need to have more control over your requests.\n\n```js\nconst axios = require('axios')\nconst plusAuth = new PlusAuthRestClient('https://\u003cYOUR_TENANT_ID\u003e.plusauth.com', {\n    httpClient: function (url, options) {\n        options.url = url\n        options.data = options.body\n        return axios(options)\n    }\n})\n```\n\n# Docs\nFor API docs visit [here](https://docs.plusauth.com/api/core)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplusauth%2Fplusauth-rest-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplusauth%2Fplusauth-rest-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplusauth%2Fplusauth-rest-js/lists"}