{"id":13472822,"url":"https://github.com/strapi/strapi-sdk-javascript","last_synced_at":"2025-10-08T02:31:51.896Z","repository":{"id":38715974,"uuid":"127266250","full_name":"strapi/strapi-sdk-javascript","owner":"strapi","description":"🔌 Official JavaScript SDK for APIs built with Strapi.","archived":true,"fork":false,"pushed_at":"2022-09-01T07:37:36.000Z","size":827,"stargazers_count":272,"open_issues_count":34,"forks_count":45,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-10-10T01:33:37.840Z","etag":null,"topics":["api","cms","dashboard","es6","graphql","headless-cms","javascript","koa","koa2","nodejs","rest-api","sdk","strapi"],"latest_commit_sha":null,"homepage":"https://strapi.io","language":"TypeScript","has_issues":false,"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/strapi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-29T09:06:25.000Z","updated_at":"2024-09-19T12:40:52.000Z","dependencies_parsed_at":"2022-07-11T02:18:15.475Z","dependency_job_id":null,"html_url":"https://github.com/strapi/strapi-sdk-javascript","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/strapi%2Fstrapi-sdk-javascript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strapi%2Fstrapi-sdk-javascript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strapi%2Fstrapi-sdk-javascript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strapi%2Fstrapi-sdk-javascript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/strapi","download_url":"https://codeload.github.com/strapi/strapi-sdk-javascript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235489078,"owners_count":18998462,"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":["api","cms","dashboard","es6","graphql","headless-cms","javascript","koa","koa2","nodejs","rest-api","sdk","strapi"],"created_at":"2024-07-31T16:00:58.272Z","updated_at":"2025-10-08T02:31:46.577Z","avatar_url":"https://github.com/strapi.png","language":"TypeScript","readme":"⚠️ This package not up to date and maintained ⚠️\n\nWe recommend you not to use this package. We stopped to maintained it by lack of time and also because the features provided by this SDK are the same as a good HTTP client well configured.\nSo I suggest you use the best HTTP client for the technology you use. To configure it to target your Strapi API.\nHere so usefull ressources to help you:\n- [**API Endpoints**](https://strapi.io/documentation/3.0.0-beta.x/guides/api-endpoints.html#endpoints)\n- [**URL parameters**](https://strapi.io/documentation/3.0.0-beta.x/guides/parameters.html)\n\n---\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://cldup.com/7umchwdUBh.png\" /\u003e\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eThe official Strapi SDK for JavaScript, available for browsers or Node.js backends.\u003c/h3\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://travis-ci.org/strapi/strapi-sdk-javascript\"\u003e\u003cimg src=\"https://img.shields.io/travis/strapi/strapi-sdk-javascript.svg?style=for-the-badge\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/strapi/strapi-sdk-javascript/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/strapi/strapi-sdk-javascript.svg?style=for-the-badge\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/strapi/strapi-sdk-javascript\"\u003e\u003cimg src=\"https://img.shields.io/codecov/c/github/strapi/strapi-sdk-javascript.svg?style=for-the-badge\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n## Install\n\n```sh\nnpm install strapi-sdk-javascript\n```\n\n## Start now\n\n### New instance\n```js\nimport Strapi from 'strapi-sdk-javascript';\n\nconst strapi = new Strapi('http://localhost:1337');\n```\n\n### Authentications\n\n#### Local\n```js\nawait strapi.login('username_or_email', 's3cr3t');\n```\n\n#### [Providers](https://strapi.io/documentation/guides/authentication.html#providers)\n```js\n// Redirect your user to the provider's authentication page.\nwindow.location = strapi.getProviderAuthenticationUrl('facebook');\n```\nOnce authorized, the provider will redirects the user to your app with an access token in the URL.\n```js\n// Complete the authentication: (The SDK will store the access token for you)\nawait strapi.authenticateProvider('facebook');\n```\nYou can now fetch private APIs\n```js\nconst posts = await strapi.getEntries('posts');\n```\n\n### Files management\n\n#### Browser\n```js\nconst form = new FormData();\nform.append('files', fileInputElement.files[0], 'file-name.ext');\nform.append('files', fileInputElement.files[1], 'file-2-name.ext');\nconst files = await strapi.upload(form);\n```\n\n#### Node.js\n```js\nconst FormData = require('form-data');\nconst fs = require('fs');\nconst form = new FormData();\nform.append('files', fs.createReadStream('./file-name.ext'), 'file-name.ext');\nconst files = await strapi.upload(form, {\n  headers: form.getHeaders()\n});\n```\n\n\n## API\n\n### `Strapi(baseURL, storeConfig, requestConfig)`\n### `request(method, url, requestConfig)`\n### `register(username, email, password)`\n### `login(identifier, password)`\n### `forgotPassword(email, url)`\n### `resetPassword(code, password, passwordConfirmation)`\n### `getProviderAuthenticationUrl(provider)`\n### `authenticateProvider(provider, params)`\n### `setToken(token, comesFromStorage)`\n### `clearToken(token)`\n### `getEntries(contentTypePluralized, params)`\n### `getEntry(contentTypePluralized, id)`\n### `getEntryCount(contentTypePluralized, params)`\n### `createEntry(contentTypePluralized, data)`\n### `updateEntry(contentTypePluralized, id, data)`\n### `deleteEntry(contentTypePluralized, id)`\n### `searchFiles(query)`\n### `getFiles(params)`\n### `getFile(id)`\n### `upload(data)`\n\n#### requestConfig\n\nCustom axios request configuration. [See documentation](https://github.com/axios/axios#request-config)\n\n## Resources\n\n* [Documentation](https://strapi.github.io/strapi-sdk-javascript)\n* [Changelog](https://github.com/strapi/strapi-sdk-javascript/blob/master/CHANGELOG.md)\n* [Medium story](https://medium.com/strapi/announcing-the-strapi-javascript-sdk-ac89f140a9d1)\n\n## Roadmap\n\n* GraphQL\n* Attach/Detach entry relationship\n* Real time with Socket.io\n\n## Credits\n\n* [axios](https://github.com/axios/axios)\n* [typescript-starter](https://github.com/bitjson/typescript-starter)\n\n## License\n\nMIT\n","funding_links":[],"categories":["Strapi v3","\u003ca name='Ecosystem'\u003e\u003c/a\u003eEcosystem"],"sub_categories":["Plugin \u0026 Providers - v3","\u003ca name='SDKs'\u003e\u003c/a\u003eSDKs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrapi%2Fstrapi-sdk-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrapi%2Fstrapi-sdk-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrapi%2Fstrapi-sdk-javascript/lists"}