GET /api/v1/token?library_id=`{LibraryId}`&library_secret=`{LibrarySecret}`&space_id=`{SpaceId}`&user_id=`{UserId}`&client_id=`{ClientId}`&session_id=`{SessionId}`&period=`{Period}`&grant=`{Grant}`
POST /api/v1/token?library_id=`{LibraryId}`&library_secret=`{LibrarySecret}`&space_id=`{SpaceId}`&user_id=`{UserId}`&client_id=`{ClientId}`&period=`{Period}`&grant=`{Grant}`
/api/v1/token?library_id=smhxxx&library_secret=1234abcd&space_id=spacexxx&user_id=ABCD1234&grant=upload_file,create_directory, hereinafter the same.Request parameters. | Description | Type | Required or Not |
LibraryId | Media Library ID, obtained after creating a media library in the Media Hosting console. See Create Media Library | String | Yes |
LibrarySecret | Media Library Key, obtained after creating a media library in the Media Hosting console. See Create Media Library | String | Yes |
SpaceId | Space ID. You can specify multiple Space IDs simultaneously, separated by commas. | String | If the media library is in single-tenant mode, no need to specify this parameter If the media library is in multi-tenant mode, no need to specify this parameter when operating tenant space. For other operations, this parameter is selectable if admin permission is granted, otherwise must specify this parameter. |
UserId | User identity recognition, managed by the backend | String | No |
ClientId | Client identification, managed by the backend | String | No |
SessionId | SessionId, managed by the backend | String | No |
Period | Token valid duration and auto-renewal duration after each use, optional parameter, in seconds. Valid values: positive integer. Input other value will use default value 86400 (24 hours). Input less than 300 will automatically use minimum value 300 (5 minutes). Input more than 315360000 will automatically use maximum value 315360000 (10 years). | String | No |
Grant | The granted permission. If left empty, only read permission is granted. You can specify this parameter to add multiple permissions on the basis of read-only, and use commas (,) to separate them, such as: create_directory,upload_file | String | No |
Permission Item | Description |
admin | administrator privileges, grant all privileges |
create_space | have permission to create tenant space |
delete_space | have permission to delete tenant space |
space_admin | tenant space administrator privileges, have all privileges except tenant space operations |
create_directory | have permission to create directories or albums |
delete_directory | have permission to delete directories or albums (recycle bin not enabled)/move directories or albums to recycle bin (recycle bin enabled) |
delete_directory_permanent | have permission to permanently delete directories or albums (recycle bin enabled) |
move_directory | have permission to rename or move directories or albums |
copy_directory | have permission to copy directories or albums |
upload_file | have permission to upload files, but not allowed to overwrite existing files |
upload_file_force | have permission to upload files and overwrite existing files |
begin_upload | have permission to start file upload, but not allowed to overwrite existing files |
begin_upload_force | have permission to start file upload and overwrite existing files |
confirm_upload | Have permission to complete file upload; separate the start uploading and upload completion permissions, mainly used for the separation of frontend and backend business permissions, so that upload completion must transit the business backend; if both start uploading and upload completion permissions are required, simply assign upload_file or upload_file_force. |
create_symlink | have permission to create symbolic links, but not allowed to overwrite existing files or symbolic links |
create_symlink_force | have permission to create symbolic links and overwrite existing files or symbolic links |
delete_file | have permission to delete files (recycle bin not enabled)/move files to recycle bin (recycle bin enabled) |
delete_file_permanent | have permission to permanently delete files (recycle bin enabled) |
move_file | have permission to rename or move files, but not allowed to overwrite existing files |
move_file_force | have permission to rename or move files and overwrite existing files |
copy_file | have permission to copy files, but not allowed to overwrite existing files |
copy_file_force | have permission to copy files and overwrite existing files |
delete_recycled | have permission to delete items in the recycle bin |
restore_recycled | have permission to restore items in the recycle bin |
set_history_latest | have permission to set a certain earlier version to the latest version |
delete_history | have permission to delete earlier versions |
{"attachInfo": {"operatorPhoneNumber": "18628769878"}}
Node Name (Keyword) | Description | Type | Optional or Not |
attachInfo | Trigger information, JSON Object, to record logs | Json | No |
{"accessToken": "acctk01f7af4f07me88u2svxwp9tszuekqlprquuejxxxxxx","expiresIn": 86400}
Node Name (Keyword) | Description | Type |
accessToken | specific value of the access token | String |
expiresIn | Valid duration of the access token, in seconds | Int |
Feedback