API

Authentication

Learn to use project and team access tokens with HTTP Bearer authentication. Understand token scopes and permissions.

Access Tokens

The Chunkify API uses access tokens for authentication, there are two types of token, one for project level actions and one for team level actions.

Manage access tokens with the APP

You can go to your team settings to manage your team tokens, or your project settings to manage your project tokens. Go to chunkify.dev and login with your account.

When creating a new project, a project token is automatically created. Note that this is not the case for the team token when a new team is created.

Remember to keep your Acess tokens safe and never share them publicly! Do not share it with others or expose it in client-side code.

HTTP Bearer Authentication

If you want to access the API via HTTP requests, access tokens should be provided via HTTP Bearer authentication.

Authorization: Bearer YOUR_ACCESS_TOKEN

Team Token Scope

These tokens are prefixed with sk_team_ and are used for all the actions performed on the following resources: project or token.

With this scope you can do the following actions:

Resource Actions
Project Get,List, Create, Update, Delete
Token List, Create, Revoke

When using the API, you can use your team token like this:

import { createClient } from 'chunkify';

const client = new Chunkify({
    teamAccessToken: 'My Team Access Token',
});

// Then you can do a team level action
const projects = await client.projects.list();
console.log(projects.data);

Project Token Scope

These tokens are prefixed with sk_project_ and are used for the actions performed on the following ressources: upload, source, job,file,notification,storage, webhook.

When using the API, you can use your project token like this:

import { createClient } from 'chunkify';

const client = new Chunkify({
    projectAccessToken: 'My Project Access Token',
});

// Then you can do a project level action
const webhooks = await client.webhooks.list();
console.log(webhooks);