Rapidgator

Rapidgator: Fast, safe and secure file hosting

Language: English

Api

File


Upload

URL: http(s)://rapidgator.net/api/v2/file/upload
Description: Checks if instant upload is possible and return upload session object with file info or upload URL.
Method: (GET|POST)

Required params:
- token - Access Token to authenticate the user's current session.
- name - The file name
- hash - MD5 hash of the file
- size - The file size

Optional params:
- folder_id - The key that identifies the destination folder. If the folder_id is not passed, will be used the root folder.
- multipart - This parameter indicates the type of upload. Default is true.

Possible values of the State property:
- 0 - Uploading
- 1 - Processing
- 2 - Done
- 3 - Fail

Upload steps:
1. Do upload API request (see request example and response example 1) If upload state not equal 0 no need other steps.
2. Upload file to upload url (see upload form example and response example 2).
3. Do upload_info API request.
OR
1. Use API Libraries.

Request example: /api/v2/file/upload?folder_id=34&name=test-setup.exe&hash=aed49fdd25ae495e44375f6636aed59c&size=310452&token=arsd4h37ecfkdqd16uolf5nai1

Success response example 1:

Upload form example:
<form method="post" action="http://pr3.rapidgator.net/?r=upload/api&uuid=0la4fzVZUMUulOliVcleXY0Kn9nmJGAy&sid=6eo5bhrslh3lggb8kmu8lgk781" enctype="multipart/form-data">
    <input type="file" name="file"/>
</form>

Success response example 2:

Error response example:

Upload info

URL: http(s)://rapidgator.net/api/v2/file/upload_info
Description: Checks upload session state.
Method: (GET|POST)

Required params:
- token - Access Token to authenticate the user's current session.
- upload_id - The upload session id.

Optional params:

Possible values of the State property:
- 0 - Uploading
- 1 - Processing
- 2 - Done
- 3 - Fail

Request example: /api/v2/file/upload_info?upload_id=0la4fzVZUMUulOliVcleXY0Kn9nmJGAy&token=6eo5bhrslh3lggb8kmu8lgk781

Success response example:


Error response example:

Download

URL: http(s)://rapidgator.net/api/v2/file/download
Description: Download a file.
Method: (GET|POST)

Required params:
- token - Access Token to authenticate the user's current session.
- file_id - The key that identifies the file.

Optional params:

Request example: /api/v2/file/download?file_id=n6eg62ga6hr5r6hjpepfh7asf2&token=n6eg62ga6hr5r6hjpepfh7asf2

Success response example:

Error response example:

Info

URL: http(s)://rapidgator.net/api/v2/file/info
Description: Returns a file's details.
Method: (GET|POST)

Required params:
- token - Access Token to authenticate the user's current session.
- file_id - The key that identifies the file.

Optional params:

Request example: /api/v2/file/info?file_id=267796c7b59efd11126606dbde8dd1e4&token=n6eg62ga6hr5r6hjpepfh7asf2

Success response example:

Error response example:

Rename

URL: http(s)://rapidgator.net/api/v2/file/rename
Description: Rename a file.
Method: (GET|POST)

Required params:
- token - Access Token to authenticate the user's current session.
- name - The new name of the file.
- file_id - The key that identifies the file to be renamed.

Optional params:

Request example: /api/v2/file/rename?name=test_rename.exe&file_id=267796c7b59efd11126606dbde8dd1e4&token=et39c69r9ooj6dn4ukkfqjvml1

Success response example:

Error response example:

Copy

URL: http(s)://rapidgator.net/api/v2/file/copy
Description: Copy a file to another folder.
Method: (GET|POST)

Required params:
- token - Access Token to authenticate the user's current session.
- folder_id_dest - The key that identifies the destination folder.
- file_id - The key that identifies the file. You can also specify multiple file keys separated by comma.

Optional params:

Request example: /api/v2/file/copy?file_id=267796c7b59efd11126606dbde8dd1e4&folder_id_dest=345&token=arsd4h37ecfkdqd16uolf5nai1

Success response example:

Error response example:

Move

URL: http(s)://rapidgator.net/api/v2/file/move
Description: Move a file to another folder.
Method: (GET|POST)

Required params:
- token - Access Token to authenticate the user's current session.
- folder_id_dest - The key that identifies the destination folder.
- file_id - The key that identifies the file. You can also specify multiple file keys separated by comma.

Optional params:

Request example: /api/v2/file/move?file_id=267796c7b59efd11126606dbde8dd1e4&folder_id_dest=345&token=arsd4h37ecfkdqd16uolf5nai1

Success response example:

Error response example:

Delete

URL: http(s)://rapidgator.net/api/v2/file/delete
Description: Delete a file.
Method: (GET|POST)

Required params:
- token - Access Token to authenticate the user's current session.
- file_id - The key that identifies the file. You can also specify multiple file keys separated by comma.

Optional params:

Request example: /api/v2/file/delete?file_id=22840393c2de9b1bef3601d9f5d61e68&token=arsd4h37ecfkdqd16uolf5nai1

Success response example:

Error response example:

Change mode

URL: http(s)://rapidgator.net/api/v2/file/change_mode
Description: Change a file mode.
Method: (GET|POST)

Required params:
- token - Access Token to authenticate the user's current session.
- file_id - The key that identifies the file.
- mode - New file mode.

Optional params:

Possible values of the Mode property:
- 0 - Public
- 1 - Premium only
- 2 - Private
- 3 - Hotlink

Request example: /api/v2/file/change_mode?file_id=267796c7b59efd11126606dbde8dd1e4&mode=1&token=arsd4h37ecfkdqd16uolf5nai1

Success response example:

Error response example:

URL: http(s)://rapidgator.net/api/v2/file/check_link
Description: Check download link.
Method: (GET|POST)

Required params:
- token - Access Token to authenticate the user's current session.
- url - Download link for the file. You can also specify multiple links separated by comma (max 25).

Optional params:

Request example: /api/v2/file/check_link?url=http://www.rapidgtor.net/file/267796c7b59efd11126606dbde8dd1e4/test_file.exe&token=arsd4h37ecfkdqd16uolf5nai1

Success response example:

Error response example:

URL: http(s)://rapidgator.net/api/v2/file/onetimelink_create
Description: Create one-time download link.
Method: (GET|POST)

Required params:
- token - Access Token to authenticate the user's current session.
- file_id - The key that identifies the file.

Optional params:
- url - Callback URL. A callback URL will be invoked when file will be downloaded
- notify - Send notification letter when file will be downloaded

Request example: /api/v2/file/onetimelink_create?token=n6eg62ga6hr5r6hjpepfh7asf2&file_id=0a2d1c33d77b765bd410ab2b4fd98b9d&url=http%3A%2F%2Fexample.com¬ify=1

Success response example:

Error response example:

URL: http(s)://rapidgator.net/api/v2/file/onetimelink_info
Description: Returns a one-time download link details.
Method: (GET|POST)

Required params:
- token - Access Token to authenticate the user's current session.

Optional params:
- link_id - The key that identifies the one-time link. You can also specify multiple link keys separated by comma. If the link_id is not passed, will return all one-time link details.

Request example: /api/v2/file/onetimelink_info?token=n6eg62ga6hr5r6hjpepfh7asf2&link_id=4a4564b48b1809f9df5a7992b2dc68e8243f52e0,918631d1a976b64b8541723575c71838902345

Success response example 1:

Success response example 2:

Error response example: