Error code Template
  • 08 Oct 2022
  • 1 Минута для чтения
  • Авторы
  • Тьма
    Свет
  • формат pdf

Error code Template

  • Тьма
    Свет
  • формат pdf

The content is currently unavailable in Русский. You are viewing the default English version.
Вводный текст

Error code

10001


Cause

The error is thrown when a request is sent without passing the API Token.


Fix

You can pass the api_token in two ways

  1. Via query string
  2. Via HTTP header

To understand how to generate an API token please check out this link API token generation.

1. Via Query String

  • First, encode your API token. Below code shows how to encode a string in C# using the HttpUtility class which is available in the System.Web namespace.
// using System.Web; 
HttpUtility.UrlEncode(str);
  • Add token to query string with variable name api_token.
var encodedToken = HttpUtility.UrlEncode("6u5guwqLsbNPn8cqFNzEjiiKhp5b9OqfLt2QxgbHZoPPIpV+lO+yhjw2J3P9kCtOVB0coCdocnSVWQ8lS41daSejbo+gQ1GS55CgAS7aaYj6/tMcrYLgFedaCKl4VKqLCnqNP3SjO/oN4A4i7Dcx+A==");
var url = string.Format("https://apihub.document360.io/v1/projectversions?api_token={0}", encodedToken);

2. Via HTTP Header

Add a HTTP header with key as api_token. The below code shows how to add a header in C#.

// using System.Net.Http;
var request = new HttpRequestMessage(HttpMethod.Get, "https://apihub.document360.io/v1/projectversions");
request.Headers.Add("api_token", "6u5guwqLsbNPn8cqFNzEjiiKhp5b9OqfLt2QxgbHZoPPIpV+lO+yhjw2J3P9kCtOVB0coCdocnSVWQ8lS41daSejbo+gQ1GS55CgAS7aaYj6/tMcrYLgFedaCKl4VKqLCnqNP3SjO/oN4A4i7Dcx+A==");

Also Check Out

Creating an API Token
Sending requests to the API


Была ли эта статья полезной?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.