1. Home
  2. Product manual
  3. API documentation

API documentation

Introduction

If your account has the API feature enabled you can access our API for interacting with Seconds in various ways.

It for example provides an interface for uploading your components files, letting you hook Seconds into a custom build system not natively supported by Seconds.

API

API reference/Sandbox

Authenticate

The API uses JWT-tokens for authentication.

Getting your token

In to get a JWT-token you need to provide your username and password to the https://seconds.debricked.com/api/login_check page.

Using curl the call would look like this:

curl -X POST https://seconds.debricked.com/api/login_check -d _username=YOUR_USERNAME -d _password=YOUR_PASSWORD

If successful, the response will contain your token:
{"token":"YOUR_VERY_LONG_TOKEN"}

The token has a lifetime of about an hour. If the JWT-token is invalid, such as if the token has expired, a 401 status code will be returned. You should therefore implement a way of automatically getting a new token every time you receive a 401 status code from any API call.

Warning

The JWT-token has a lifetime of about an hour.

Using your token

When you have your token you need to pass it to the Authorization HTTP header with the value Bearer YOUR_VERY_LONG_TOKEN on each API call.

Need assistance?

Contact our technical support at oscar.reimer@debricked.com

Updated on 2019-02-07

Was this article helpful?

Related Articles