The Auth Token API is used to obtain a long lived token to be used for subsequent API operations. Currently two methods are available for authentication: username/password and Share URL.
Username and password will be deprecated in favour of OAuth2 based authentication. This authentication method gives access to the user's own account and the files owned by the user.
Share URL authentication is the preferred method as it presents a flexible workflow for the users. A Share URL point to a folder in ioGates of any account and is distributed by a user with access to the folder. A Share URL may have different permissions and it is up to the API client to verify that, i.e. uploading permissions is granted before trying to upload.
As ioGates exists as a cloud service and an on premise solution it is important to use the domain of the Share URL as the API base URL. The default API URL is https://iogates.com.
Request
URL: /api/authtoken
Method: POST
POST vars or JSON: username, password, url, and deviceId.
username | Username of user |
password | Password for user |
url | The url field is used to authenticate using a share url, in this case username and password fields must be omitted or set null/false. |
deviceId | Unique id for the API client install. This is used to identify the client in ioGates |
Response
token | Long lived token for use in API operations. |
profile |
User profile object containing: id, username, realname, accountname, email, address, mobile, expires, status, and logo. Status may be: Active, Inactive, Blocked, or ValidationRequired. Logo contains a url for the account logo. |
max_file_size |
Integer. Max allowed file size in bytes. 0 means no limit. |
available_storage |
Integer. Storage left on account in bytes. |
{ "token": "33c666119", "profile": { "username": "uploadappadmin", "realname": "Upload App", "accountname": "Upload App Account", "email": "info@iogates.com", "address": null, "mobile": null, "expires": null, "status": "Active", "logo": "https://iogates.com/layout/new_york/images/common/logo.png" },
max_file_size: 0,
available_storage: 29301996265 }