Home

PHP

Sources

Call this function if you want to get a list with all your sources
API Function: get_sources

Parameters:

Name
Type
Description
username
string
Your API username. You should have received this with your account
subscription_id
string
Your Subscription ID. You can copy or regenerate it from your API management interface

Response fields: a list of sources, each having these fields

Name
Type
Description
source_id
numeric
The unique ID associated with the source
source_name
string
The source name
source_url
string
The source url
              
              
              
              
<?php   
$api_username             = '*******';
$api_subscription         = '*******';

try
{
        $client     = new SoapClient('https://synced.io/api/v2?wsdl');
        $sources    = $client->get_sources($api_username, $api_subscription);			
}
catch(Exception $e)
{
        echo $e->getMessage();
}    


if(!empty($sources))
{
    print_r($sources);
}
?>