Official sCloud Documentation for Developers.          Version: 3.1      Get the SDK

Get started with the (PHP) SDK

Note: a config.php file is being called from within sCloud_SDK.php the config.php file should contain your client_id and app_secret keys aswell as your registered redirect URI that you registered in the developers dashboard.

[simple usage] (php SDK)
SDK php javascript ajax java

<?php
 include 'sCloud_SDK.php';//include skycloud PHP SDK LIBRARY.
 $sCloud = new sCloud( 'app_key_here', 15,2,0 );

 $sCloud->generateAuthUrl(1);
 $token=$sCloud->API('token');//json format
 
 //Example API calls...
//$sCloud->API(GET,POST);
$userInfo=   $sCloud->API('account_info');//json format
$userEmail=  $sCloud->API('account_info')['registered_email'];//json format
$storageUsed=$sCloud->API('account_info')['used_storage'];//json format
$randImage=$sCloud->API('images')['22'];//json format
$sCloud->API('Videos')['count'];
  
$sCloud->AuthToken();//get authentication token info, expiry, creation date
  
   ?>
view raw

Methods:

Generates a authorization url to sCloud authorization server.$sCloud->generateAuthUrl(1);
(Options) Values:
1 will show as a hyperlink with a href tag
0 URL string, with this option set you can change the clickable text by putting the returned URL string in to your own (a href) tag.

Generates a access token from sCloud's access server.$sCloud->API('token');//json format;

API call. Where method is a sCloud API get method, example (account_info) or (Videos) etc...$sCloud->API(METHOD,PARAMS);//OPTIONAL POST PARAMETERS
(Options) Values:
METHOD API Method     
Params (optional) POST parameters.    
(Helper) Methods
Get token information.$sCloud->AuthToken();//get authentication token info, expiry, creation date

Download from github Coming soon.

Download from github Coming soon.

Available error codes with definitions.

200 Indicates that the request has succeeded.
404 Not found.This is by far the most common HTTP status code you can get. It indicates that the URL you used in your request doesn’t exist on the API server, or origin server. While this is a 4XX error, which usually means something on the client-side is wrong, this can also indicate a server problem. Sometimes API URL paths change after a version update, but sometimes they change because something on the server went wrong.
401 Unauthorized This status code means you haven’t yet authenticated against the API. The API doesn’t know who you are and it won’t serve you.
403 The forbidden status indicates that you don’t have permission to request that URL. You’re authenticated, but the user or role you’re authenticated for isn’t permitted to make the API request. This also occurs when you have an authentication issue, like when using the wrong API key or trying to access features your subscription plan doesn’t allow for.