بررسی اجمالی

The file upload API is an interface which can be used in your own applications to securely upload, manage and download files externally from this website. It can be set for use just by admin accounts, or you can provide the functionality to the rest of your users via the API settings.

API compatibility

This API will evolve over time when access to other data within the system is made available. The plugin architecture will also be integrated to enable access to specific functionality within say the rewards plugin. However, none of the current endpoints or response values will change. You can write your integration code knowing that it will now be affected by future updates.

SSL/HTTPS recommended

We recommend SSL is used for all requests. You can require SSL by forcing it via your web server.

UTF-8 encoding

Every string passed to and from the API needs to be UTF-8 encoded.

HTTP Method

All methods are done using POST unless otherwise stated.

Date format

All date/times in the API are strings in the following format:

Y-m-d H:i:s

For example:

2018-11-17 21:55:00

API Path

All requests are sent to the follow path: (you can change this via the API settings)

https://yekupload.ir/api/v2/

مدیریت خطاها

Errors are returned using standard HTTP error code syntax. Any additional information is included in the body of the return call, JSON-formatted.

Standard API errors

Error Code: Description:
400 Bad input parameter. Response error should show which one and why.
401 Bad or expired token. To fix, you should re-authenticate the user.
404 File not found at the provided path.
405 Request method not expected (generally should be GET or POST).
429 Maximum API request limit reached. Try to reduce the amount of requests or look at raising this via your web server configuration.
5xx Server error.

Sample Error JSON Response

{
	"status": "error",
	"response": "Could not authenticate user. The username and password may be invalid or your account may be locked from too many failed logins.",
	"_datetime": "2018-11-17 21:55:00"
}

احراز هویت

All requests to the API must be done with a valid access_token and account_id. These can be obtained by submitting your API keys to the authorize endpoint. The same access_token can be used multiple times in the same session, so you shouldn't generate a new access_token for each request.

API Flow

Your external application should make API requests in the following order:

  • Request an access_token and account_id /authorize.
  • Example Response:

    {
    	"data": {
    		"access_token": "lGoVSof0VRwq1Gaza8fODfIxQ4pu6j6rZvnRUCRPunfw4q5ezk3dALLqQbUWu1ntxKkrnbgSzwoDWtSwOVJoHuPxFKt9LRCjCXK081SIxgmuJe1y9KXQfMoVwS4iJHBm",
    		"account_id": "158642"
    	},
    	"_status": "success",
    	"_datetime": "2018-11-17 21:55:00"
    }
  • Request to the core API, such as getting user account details /account/info.
  • Make further API requests at any stage using the same access_token.
  • Once you've completed your requests you can clear the access_token. This is optional as these are also automatically cleared after 1 hour of no activity /disable_access_token.
  • Important: On each request you should check an error response. If the request resulted in an error, the "_status" will be "error" with more information in the "response" parameter.

ایجاد توکن ( /authorize )

Provides an access_token and account_id to make further requests into the API.

URL Structure
https://yekupload.ir/api/v2/authorize
Parameters
  • key1 The API key 1. Expected 64 characters in length.
  • key2 The API key 2. Expected 64 characters in length.
Sample Request
https://yekupload.ir/api/v2/authorize?key1=M2fqwM3i650vwc1IExB9VffeDtqeQv43Q7pZqGblSGzVIqZiMoV4ou8LeYH4SKAU&key2=ZqGblSGzVIqZiMoV4ou8LeYH4SKAUlTWAckX3Xp6cUcue22Q3AlpCiZz3mJQWPT2
Returns

A JSON-encoded string including an access token (access_token) and account id (account_id).

Sample Successful JSON Response

{
	"data": {
		"access_token": "X3Xp6cUcue22Q3AlpCiZz3mJQWPT2v10zZqGblSGzVIqZiMoV4ou8LeYH4SKAUL9TcP5xIL7DtxDMj2HoqcwbrvTvoD5ioebA4h7M2fqwM3i650vwc1IExB9VffeDtqe",
		"account_id": "158642"
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide key1. It must be 64 characters in length.
200 Please provide key2. It must be 64 characters in length.
200 Could not authenticate user. The username and password may be invalid or your account may be locked from too many failed logins..
200 Failed issuing access token.

غیرفعال سازی توکن ( /disable_access_token )

Disables an active access_token.

URL Structure
https://yekupload.ir/api/v2/disable_access_token
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"response": "Token removed or no longer available.",
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the access_token param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.

حساب کاربری ( /account/info )

Provides details of an account based on the account_id.

URL Structure
https://yekupload.ir/api/v2/account/info
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
Returns

A JSON-encoded string including a username (username), account level id (level_id), email address (email) and more.

Sample Successful JSON Response

{
	"data": {
		"id": "158642",
		"username": "admin",
		"level_id": "20",
		"email": "email@yekupload.ir",
		"lastlogindate": "2017-02-18 11:43:39",
		"lastloginip": "192.168.33.1",
		"status": "active",
		"title": "Mr",
		"firstname": "Admin",
		"lastname": "User",
		"languageId": "1",
		"datecreated": null,
		"lastPayment": "2011-12-27 13:45:22",
		"paidExpiryDate": "0000-00-00 00:00:00",
		"storageLimitOverride": null
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the access_token param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.

پلن های کاربری ( /account/package )

Provides the account restrictions inherited from the package associated to the account.

URL Structure
https://yekupload.ir/api/v2/account/package
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
Returns

A JSON-encoded string including a label (label), max upload size (max_upload_size) and more.

Sample Successful JSON Response

{
	"data": {
		"id": "20",
		"label": "Premium Account",
		"max_upload_size": "1073741824",
		"can_upload": "1",
		"wait_between_downloads": "0",
		"download_speed": "0",
		"max_storage_bytes": "0",
		"show_site_adverts": "0",
		"show_upgrade_screen": "1",
		"days_to_keep_inactive_files": "0",
		"concurrent_uploads": "100",
		"concurrent_downloads": "0",
		"downloads_per_24_hours": "0",
		"max_download_filesize_allowed": "0",
		"max_remote_download_urls": "50",
		"level_type": "paid user",
		"on_upgrade_page": "0"
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the access_token param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.

ایجاد حساب کاربری ( /account/create )

Create a new account.

Note: This endpoint is available to admin only API users.

URL Structure
https://yekupload.ir/api/v2/account/create
Parameters
  • access_token The access token created previously by /authorize.
  • username The new account username. No spaces.
  • password The new account password. No spaces, min 8 characters, subject to password policy.
  • email The account email address.
  • package_id The package id. Chosen from /package/listing.
  • status The account status. Chosen from 'pending', 'active', 'disabled' or 'suspended'. Default 'active'.
  • title Account owner title. Chosen from 'Mr', 'Ms', 'Mrs', 'Miss' or 'Dr'.
  • firstname Account owner first name.
  • lastname Account owner last name.
  • paid_expiry_date The paid expiry date/time, if this is a premium account. In the format YYYY-MM-DD HH:MM:SS. i.e. 2018-11-17 21:55:00
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"response": "User successfully created.",
	"data": {
		"id": "24",
		"username": "accounttest",
		"level_id": "2",
		"email": "someone@gmail.com",
		"lastlogindate": null,
		"lastloginip": null,
		"status": "active",
		"title": "Mr",
		"firstname": "Bob",
		"lastname": "Test",
		"languageId": null,
		"datecreated": "2018-01-21 16:40:33",
		"lastPayment": null,
		"paidExpiryDate": null,
		"storageLimitOverride": null
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the username param.
200 Email address already exists on another account.
200 Could not validate access_token, please reauthenticate or try again.

ویرایش حساب کاربری ( /account/edit )

Edit an existing account.

Note: This endpoint is available to admin only API users.

URL Structure
https://yekupload.ir/api/v2/account/edit
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id to edit (admin or moderator accounts can not be edited via the API).
  • password Update the account password. No spaces, min 8 characters, subject to password policy.
  • email The account email address.
  • package_id The package id. Chosen from /package/listing.
  • status The account status. Chosen from 'pending', 'active', 'disabled' or 'suspended'. Default 'active'.
  • title Account owner title. Chosen from 'Mr', 'Ms', 'Mrs', 'Miss' or 'Dr'.
  • firstname Account owner first name.
  • lastname Account owner last name.
  • paid_expiry_date The paid expiry date/time, if this is a premium account. In the format YYYY-MM-DD HH:MM:SS. i.e. 2018-11-17 21:55:00
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"response": "User successfully updated.",
	"data": {
		"id": "24",
		"username": "accounttest",
		"level_id": "2",
		"email": "someone@gmail.com",
		"lastlogindate": null,
		"lastloginip": null,
		"status": "active",
		"title": "Mr",
		"firstname": "Bob",
		"lastname": "Test",
		"languageId": null,
		"datecreated": "2018-01-21 16:40:33",
		"lastPayment": null,
		"paidExpiryDate": null,
		"storageLimitOverride": null
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Email address already exists on another account.
200 Could not validate access_token, please reauthenticate or try again.

حذف حساب کاربری ( /account/delete )

Delete an active account, including all folders and files.

Note: This endpoint is available to admin only API users.

URL Structure
https://yekupload.ir/api/v2/file/account
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id to delete.
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"response": "Account successfully set as deleted.",
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.

آپلود فایل ( /file/upload )

Provides an interface to upload files. Note: There is currently no support for chunked uploads, this will be added at a later stage.

URL Structure
https://yekupload.ir/api/v2/file/upload
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
  • upload_file The uploaded file.
  • folder_id A folder id within the users account. If left blank the file will be added to the root folder.
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"response": "File uploaded",
	"data": [
		{
			"name": "sample4_l.jpg",
			"size": "149084",
			"type": "application/octet-stream",
			"error": null,
			"url": "https://yekupload.ir/2Vv",
			"delete_url": "https://yekupload.ir/2Vv~d?41efa710444abad11a8f4b5a90e4d746",
			"info_url": "https://yekupload.ir/2Vv~i?41efa710444abad11a8f4b5a90e4d746",
			"delete_type": "DELETE",
			"delete_hash": "41efa710444abad11a8f4b5a90e4d746",
			"hash": "2f4105bc2c626232544275c2d890168b",
			"stats_url": "https://yekupload.ir/2Vv~s",
			"short_url": "2Vv",
			"file_id": "1253",
			"unique_hash": "60b0be7e3b18de9a3f00d940a8e5a9834c6cdc0f49d40af64973be5ca504c4fd",
			"url_html": "<a href="https://yekupload.ir/2Vv" target="_blank" title="View image on File Upload Script">view sample4_l (1).jpg on File Upload Script</a>",
			"url_bbcode": "[url]https://yekupload.ir/2Vv[/url]"
		}
	],
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the access_token param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.
200 Did not receive uploaded file.
200 Filesize received was zero.
200 PHP Curl module does not exist on your server/web hosting. It will need to be enable to use this upload feature.
200 Error uploading file. No response received from:

Note: Account upload restrictions are still in place, so you may also receive the same errors as shown on the site uploader.

دانلود فایل ( /file/download )

Generates a unique download url for a file.

URL Structure
https://yekupload.ir/api/v2/file/download
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
  • file_id The file id to generate the download url for.
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"data": {
		"file_id": "1253",
		"filename": "sample4_l.jpg",
		"download_url": "https://yekupload.ir/2Vv?download_token=c3e6289a23e9819d8663569da96087d0760ccc46d0f3ddbe3f6930b261777067"
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the file_id param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.
200 Could not find file based on file_id.
200 Could not generate download url.

جزئیات فایل ( /file/info )

Provides meta data and urls of a file within a users account.

URL Structure
https://yekupload.ir/api/v2/file/info
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
  • file_id The file id to get information on.
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"data": {
		"id": "1253",
		"filename": "sample4_l.jpg",
		"shortUrl": "2Vv",
		...
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the file_id param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.
200 Could not find file based on file_id.

ویرایش فایل ( /file/edit )

Provides meta data and urls of a file within a users account.

URL Structure
https://yekupload.ir/api/v2/file/edit
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
  • file_id The file id to update.
  • filename The new filename. Leave blank to keep existing.
  • fileType The new file type/mime type. Example: application/octet-stream. Leave blank to keep existing.
  • folder_id The new folder id in the users account. Leave blank to keep existing.
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"response": "File successfully updated.",
	"data": {
		"id": "1253",
		"filename": "sample4.jpg",
		"shortUrl": "2Vv",
		...
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the file_id param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.
200 Could not find file based on file_id.

حذف فایل ( /file/delete )

Delete an active file.

URL Structure
https://yekupload.ir/api/v2/file/delete
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
  • file_id The file id to delete.
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"response": "File successfully set as deleted.",
	"data": {
		"id": "1253",
		"filename": "sample4.jpg",
		"shortUrl": "2Vv",
		"status": "trash",
		...
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the file_id param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.
200 Could not find file based on file_id.

انتقال فایل ( /file/move )

Move an active file to another folder.

URL Structure
https://yekupload.ir/api/v2/file/move
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
  • file_id The file id to move.
  • new_parent_folder_id The folder id to move the file into.
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"response": "File successfully moved.",
	"data": {
		"id": "1162",
		"filename": "button_back_over.gif",
		"shortUrl": "2U2",
		...
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the file_id param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.
200 Could not find file based on file_id.
200 Please provide the new_parent_folder_id param.
200 Could not find the destination folder id defined by new_parent_folder_id.

کپی فایل ( /file/copy )

Copy an active file to another folder.

URL Structure
https://yekupload.ir/api/v2/file/copy
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
  • file_id The file id to copy.
  • copy_to_folder_id The folder id to copy the file into.
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"response": "File successfully copyied.",
	"original_file": {
		"data": {
			"id": "1162",
			"filename": "button_back_over.gif",
			"shortUrl": "2U2",
			...
		}
	},
	"new_file": {
		"data": {
			"id": "1254",
			"filename": "button_back_over.gif",
			"shortUrl": "2Vw",
			...
		}
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the file_id param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.
200 Could not find file based on file_id.
200 Please provide the copy_to_folder_id param.
200 Could not find the destination folder id defined by copy_to_folder_id.

ایجاد پوشه ( /folder/create )

Create a new folder.

URL Structure
https://yekupload.ir/api/v2/folder/create
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
  • folder_name The new folder name.
  • parent_id The folder parent id. Optional.
  • is_public Whether a folder is available publicly or private only. 0 = Private, 1 = Unlisted, 2 = Public in site search. Default Private.
  • access_password An MD5 hash of an access password. Expects 32 characters in length. Optional.
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"response": "Folder successfully created.",
	"data": {
		"id": "125",
		"parentId": null,
		"folderName": "My New Folder",
		"totalSize": "0",
		"isPublic": "2",
		"accessPassword": "d9729feb74992cc3482b350163a1a010",
		"date_added": "2017-02-18 12:26:06",
		"date_updated": null,
		"url_folder": "https://yekupload.ir/folder/125/My_New_Folder",
		"total_downloads": 0,
		"child_folder_count": 0,
		"file_count": 0
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the folder_name param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.

لیست پوشه ها ( /folder/listing )

Returns a list of folders and files within the passed parent_folder_id. If this value is blank the root folder/file listing is returned.

URL Structure
https://yekupload.ir/api/v2/folder/listing
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
  • parent_folder_id The folder parent id. Optional.
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"data": {
		"folders": [
			{
				"id": "123",
				"parentId": null,
				"folderName": "My Folder 1",
				"totalSize": "868689",
				"isPublic": "1",
				"date_added": "2017-02-15 20:02:05",
				"date_updated": null,
				"url_folder": "https://yekupload.ir/folder/123/My_Folder_1",
				"total_downloads": 5864,
				"child_folder_count": 1,
				"file_count": 0
			},
			{
				"id": "107",
				"parentId": null,
				"folderName": "My Folder 2",
				...
			},
			{
				"id": "108",
				"parentId": null,
				"folderName": "My Folder 3",
				....
			}
		],
		"files": [
			{
				"id": "1161",
				"filename": "button_back.gif",
				"shortUrl": "2U1",
				"fileType": "image/gif",
				"extension": "gif",
				"fileSize": "1116",
				"status": "active",
				"downloads": "5865",
				"folderId": null,
				"keywords": "button,back,gif",
				"url_file": "https://yekupload.ir/2U1"
			},
			{
				"id": "1163",
				"filename": "button_cancel.gif",
				"shortUrl": "2U3",
				...
			},
			{
				"id": "1164",
				"filename": "button_cancel_over.gif",
				"shortUrl": "2U4",
				...
			}
		]
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the access_token param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.

جزئیات پوشه ( /folder/info )

Provides information for a specific folder id.

URL Structure
https://yekupload.ir/api/v2/folder/info
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
  • parent_folder_id The folder parent id. Optional.
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"data": {
		"id": "123",
		"parentId": null,
		"folderName": "My Folder 1",
		"totalSize": "868689",
		"isPublic": "1",
		"accessPassword": null,
		"date_added": "2017-02-15 20:02:05",
		"date_updated": null,
		"url_folder": "https://yekupload.ir/folder/123/My_Folder_1",
		"total_downloads": 5864,
		"child_folder_count": 1,
		"file_count": 0
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the access_token param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.
200 Could not find folder based on folder_id.

ویرایش پوشه ( /folder/edit )

Provides an interface to edit a folder.

URL Structure
https://yekupload.ir/api/v2/folder/edit
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
  • folder_id The folder id to update.
  • folder_name The new folder name. Optional.
  • parent_id The new parent id to move the folder. Optional.
  • is_public Whether a folder is available publicly or private only. 0 = Private, 1 = Unlisted, 2 = Public in site search. Optional.
  • access_password An MD5 hash of an access password. Expects 32 characters in length. Optional.
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"response": "Folder successfully updated.",
	"data": {
		"id": "118",
		"parentId": "117",
		"folderName": "My New Folder Name",
		"totalSize": "1024538",
		"isPublic": "1",
		"accessPassword": null,
		"date_added": null,
		"date_updated": null,
		"url_folder": "https://yekupload.ir/folder/118/My_New_Folder_Name",
		"total_downloads": 0,
		"child_folder_count": 0,
		"file_count": 11
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the access_token param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.
200 Could not find folder based on folder_id.

حذف پوشه ( /folder/delete )

Provides an interface to delete a folder.

URL Structure
https://yekupload.ir/api/v2/folder/delete
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
  • folder_id The folder id to update.
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"response": "Folder successfully set as deleted.",
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the access_token param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.
200 Could not find folder based on folder_id.

انتقال پوشه ( /folder/move )

Provides an interface to move a folder.

URL Structure
https://yekupload.ir/api/v2/folder/move
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
  • folder_id The folder id to update.
  • new_parent_folder_id The folder id to move the folder into.
Returns

A JSON-encoded string with the response message.

Sample Successful JSON Response

{
	"response": "Folder successfully moved.",
	"data": {
		"id": "117",
		"parentId": "99",
		"folderName": "layered_png_files",
		...
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the access_token param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.
200 Please provide the folder_id param.
200 Could not find folder based on folder_id.

جزئیات حساب کاربری ( /account/info )

Provides details of an account based on the account_id.

URL Structure
https://yekupload.ir/api/v2/account/info
Parameters
  • access_token The access token created previously by /authorize.
  • account_id The account id returned by /authorize.
Returns

A JSON-encoded string including a username (username), account level id (level_id), email address (email) and more.

Sample Successful JSON Response

{
	"data": {
		"id": "158642",
		"username": "Administrator",
		"level_id": "20",
		"email": "email@yekupload.ir",
		"lastlogindate": "2017-02-18 11:43:39",
		"lastloginip": "192.168.33.1",
		"status": "active",
		"title": "Mr",
		"firstname": "Admin",
		"lastname": "User",
		"languageId": "1",
		"datecreated": null,
		"lastPayment": "2011-12-27 13:45:22",
		"paidExpiryDate": "0000-00-00 00:00:00",
		"storageLimitOverride": null
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the access_token param.
200 Please provide the account_id param.
200 Could not validate access_token and account_id, please reauthenticate or try again.

لیست پلن های کاربری ( /package/listing )

Provides a list of available user packages within the system.

Note: This endpoint is available to admin only API users.

URL Structure
https://yekupload.ir/api/v2/package/listing
Parameters
  • access_token The access token created previously by /authorize.
Returns

A JSON-encoded string including a label (label), package id (id) and more.

Sample Successful JSON Response

{
	"data": {
			"packages": [
				{
					"id": "1",
					"label": "free user",
					"max_upload_size": "104857600",
					"can_upload": "1",
					"wait_between_downloads": "0",
					"download_speed": "50000",
					"max_storage_bytes": "0",
					"show_site_adverts": "1",
					"show_upgrade_screen": "1",
					"days_to_keep_inactive_files": "60",
					"concurrent_uploads": "50",
					"concurrent_downloads": "0",
					"downloads_per_24_hours": "0",
					"max_download_filesize_allowed": "0",
					"max_remote_download_urls": "5",
					"level_type": "free",
					"on_upgrade_page": "0"
				}
			]
	},
	"_status": "success",
	"_datetime": "2018-11-17 21:55:00"
}
Possible Errors
200 Please provide the access_token param.
200 API user must be an admin user for this endpoint.
200 Could not validate access_token, please reauthenticate or try again.