https://github.com/simenandre/scrivejs
https://github.com/simenandre/scrivejs
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/simenandre/scrivejs
- Owner: simenandre
- License: apache-2.0
- Created: 2022-02-04T22:59:08.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-02-16T21:32:12.000Z (4 months ago)
- Last Synced: 2026-02-17T04:09:09.309Z (4 months ago)
- Language: TypeScript
- Size: 254 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Scrive Typescript SDK
[](https://www.tidyverse.org/lifecycle/#experimental)
[](https://www.npmjs.com/package/scrive-sdk)
[](https://codecov.io/gh/cobraz/scrivejs)

Use this to integrate with the [Scrive API][scrive-docs].
**Note**: Don't expect full coverage for the API, as there is no code generating
involved; we add features as we go. Contributions are very welcome!
[scrive-docs]: https://apidocs.scrive.com/
## Features
- ✅ Great test coverage
- 💁♂️ Inline documentation
- 🔒 Runtime type-checking
## Documentation
To get started, install the NPM package.
```shell
yarn add scrive-sdk
```
Let's look at an example where we are creating a new document based on a
template.
**Tip**: In the Scrive UI, you'll find the ID as the numeric value in the URL.
Let's say the URL to the document is `https://scrive.com/d/9222321123123`, then
the ID is `9222321123123
```typescript
import { ScriveSdk } from 'scrive-sdk';
const client = ScriveSdk.usePersonalAccessCredentials({
apitoken: 'something',
accesstoken: 'is-something',
apisecret: 'when-there-nothing',
accesssecret: 'here',
});
client.prepare().newDocumentFromTemplate('9222321123123');
```
The SDK provides a way to construct the SDK class based on which way you are
going to authenticate with the API. For now, we only support _personal access
credentails_ as shown above, but I imagine this will look very similar once
OAuth is added too.