3. Making your first request
  • 18 Feb 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

3. Making your first request

  • Dark
    Light

In this article, we will help you make your first request to the Document360 API. Before proceeding make sure the following prerequisites are met. 

Prerequisites

You should have a valid Document360 API token. To generate a new token please refer to this article for a step-by-step guide. 



Request

For example, we will be calling the Teams endpoint https://apihub.document360.io/v2/teams to get all the team account users in the project.

BASE URL
The base URL for all Document360 API endpoints will be https://apihub.document360.io followed by version number. For example, to access the V2 version of the Document360 API the base URL will be https://apihub.document360.io/v2

Authentication

Document360 API uses token-based authentication.  All requests to the Document360 API will be authenticated. The token has to be passed via an HTTP header with key as api_token and the value will be the API token. 

Using curl

The first approach to send a request is by using curl (Client URL). 

The below example makes a GET request to retrieve all the team accounts in the project. Just replace the text #your_token# with your actual token. When you execute this you should get a list of all team accounts associated with the project.

curl --request GET "https://apihub.document360.io/v2/teams" --header "api_token: #your_token#"
Shell


Pro-tip
When using curl commands in windows make sure to use double quotes as shown in the above command instead of single quotes. Otherwise, you will get an error saying HTTP is not supported or disabled in libcurl.

Using Swagger

The 'How to- guide for Swagger' provides an easy way to send requests and also explore the different endpoints available in the Document360 API. We have a step-by-step guide to help you get started using our swagger documentation site. 


Was this article helpful?