premium.to API Functions: Name: getauthcode.php Parameters: username, password Description: With this method you can get your auth code Reply: auth code (HTTP code 200) or error description (HTTP code 420) Example: http://api.premium.to/api/getauthcode.php?username=YOUR USERNAME&password=YOUR PASSWORD Name: getfile.php Parameters: ((username, password) OR auth code ), link (an URLENCODED download link which starts with or without http://) Description: With this method you can download all supported download links Reply: octet-stream (HTTP code 200), redirect to another server (HTTP code 302) or error description (HTTP code 420) Example: http://api.premium.to/api/getfile.php?username=YOUR USERNAME&password=YOUR PASSWORD&link=filesonic.com%2Ffile%2FHI7569 http://api.premium.to/api/getfile.php?authcode=YOUR AUTHCODE&link=filesonic.com%2Ffile%2FHI7569 Name: traffic.php Parameters: (username, password) OR auth code Description: With this method you can see your traffic balance Reply: traffic balance in bytes (HTTP code 200) or error description (HTTP code 420) Example: http://api.premium.to/api/traffic.php?username=YOUR USERNAME&password=YOUR PASSWORD http://api.premium.to/api/traffic.php?authcode=YOUR AUTHCODE Name: straffic.php Parameters: (username, password) OR auth code Description: With this method you can see all traffic balances Reply: traffic balances in bytes seperated by a semicolon ( left: normal traffic, right: special traffic, HTTP code 200) or error description (HTTP code 420) Example: http://api.premium.to/api/straffic.php?username=YOUR USERNAME&password=YOUR PASSWORD http://api.premium.to/api/straffic.php?authcode=YOUR AUTHCODE Name: hosters.php Parameters: (username, password) OR auth code Description: With this method you can get all supported hosters Reply: hosters (separated by a semicolon) (HTTP code 200) or error description (HTTP code 420) Example: http://api.premium.to/api/hosters.php?username=YOUR USERNAME&password=YOUR PASSWORD http://api.premium.to/api/hosters.php?authcode=YOUR AUTHCODE Name: sendtraffic.php Parameters: ((username, password) OR auth code ), quantity (in megabytes), receiver (username who should get the traffic) Description: With this method you can send traffic to another user Reply: HTTP code 200 or error description (HTTP code 420) Example: http://api.premium.to/api/sendtraffic.php?username=YOUR USERNAME&password=YOUR PASSWORD&quantity=40000000&receiver=OTHER USERNAME http://api.premium.to/api/sendtraffic.php?authcode=YOUR AUTHCODE&quantity=40000000&receiver=OTHER USERNAME Name: changeemail.php Parameters: username, password, newemail Description: With this method you can change your E-Mail. This function doesn't take an auth code! Reply: HTTP code 200 or error description (HTTP code 420) Example: http://api.premium.to/api/changeemail.php?username=YOUR USERNAME&password=YOUR PASSWORD&newemail=YOUR NEW EMAIL Name: changepassword.php Parameters: username, password, newpassword Description: With this method you can change your password. This function doesn't take an auth code and your auth code will change! Reply: HTTP code 200 or error description (HTTP code 420) Example: http://api.premium.to/api/changepassword.php?username=YOUR USERNAME&password=YOUR PASSWORD&newpassword=YOUR NEW PASSWORD