The ioGates Auth Info API

Retrieve upload methods via the Auth Info API after creating a file, ensuring the use of precise file names and how to choose among FTP(S), plupload, or TUS protocols for optimal file uploading.

Introduction to Auth Info API

The Auth Info API plays a crucial role in ioGates' file management system, specifically after a file is created using the File API. This API endpoint provides essential details on available and recommended upload methods, tailored to ensure efficient and secure file uploads.

API Endpoint Details

  • URL: /api/authinfo/{token}
  • Method: GET

Using the Auth Info API

  1. Obtaining Upload Methods:

    The API is designed to retrieve a list of upload methods available for use post file creation. It's vital to use the exact file name returned by the File API to ensure seamless uploads.
  2. Request Headers:

    Token: An authorization token is required, obtained from the Auth API. This token must possess upload capabilities to proceed.
  3. Response Structure:

  4. The API response includes a variety of important fields:
    • Available: Lists all the upload methods accessible.
    • Default: Indicates the default method for uploading.
    • FTP: Details for uploading via Passive FTP(S), including server, port, ssl, username, password, and protocol.
    • Plupload: Provides information for uploads using the plupload library, detailing server, chunk size, max file size, and protocol.
    • TUS: Describes how to upload using the TUS protocol, with server, chunk size, max file size, and protocol. It notes that the TUS client must support the creation extension and set the filename metadata.
  5. Key Parameters:

    • Max File Size: The maximum allowable file size for uploads, where 0 indicates no limit.
    • Available Storage: Shows the remaining storage space on the account in bytes.

Example Response

{
  "available": ["ftp", "plupload", "tus"],
  "default": "ftp",
  "ftp": {
    "server": "ftp.iogates.com",
    "port": 21,
    "ssl": true,
    "username": "user",
    "password": "password",
    "protocol": "ftps"
  },
  "plupload": {
    "server": "https://iogates.com/handlers/upload.php?token=a80d9be201",
    "chunk_size": 33554432,
    "max_file_size": 524288000,
    "protocol": "https"
  },
  "tus": {
    "server": "https://iogates.com/upload/tus/a80d9be201",
    "chunk_size": 33554432,
    "max_file_size": 524288000,
    "protocol": "https"
  },
  "max_file_size": 524288000,
  "available_storage": 29301996265
}