Arguments
The Get Social Providers by User Name command requires the following arguments: Command, Realm, Password, Provider Name, and User Name.
api_web?r=myrealm&p=mypass&c=getsocialproviderbyusername&provider=facebook&username=myemail@mydomain.com
The command is ‘getsocialproviderbyusername’, the realm is ‘myrealm’ and the password is ‘mypass’, the provider is id 'facebook', and the Social Network user is 'myemail@mydomain.com’.
The Get Social Provider by User Name command supports the following arguments:
Name |
Req? |
Description |
Argument |
Command |
Yes |
Defines the command to use. |
cmd= getsocialproviderbyusername c= getsocialproviderbyusername |
Realm |
Yes |
Name of the realm to run the command. This is required, and the command will fail if the realm and password do not match. |
realm=[realm_name] r=[realm_name] |
Password |
Yes |
Authentication code for API access. This is required, and the command will fail if the realm and password do not match. |
pwd=[password] p=[password] |
Social Provider | Yes | Name for the Social Provider in the realm. Current provider strings include: facebook, twitter, linkedin | provider=[social_provider_name] |
User Name | Yes | Identifier of the Social Network user. | username=[username] |
Output Format | To specify the format of the list output, use one of two arguments. If no argument is included, the default output is space-delimited plain text string, which may not include all data columns. |
csv=1 or output_format=[csv,csv_tab, csv_pipe,xml] |
|
Header | To define the data with a label, use the Header argument. This can only be used in conjunction with the output format, and does not affect XML. |
headers=[0,1] DEFAULT==0 |
Example
Using all commands and arguments (please note the command is wrapped for display purposes only):
api_web?r=myrealm&p=mypass&c=getsocialproviderbyusername&provider=facebook&username=myemail@mydomain.com&output_format=csv&headers=1
Successful results return:
"social_provider_id","provider","username"
"89","FACEBOOK","myemail@mydomain.com"
Results
The Get Social Provider by User Name command outputs either the results of the search or a FAILURE message.
SUCCESS
The Get Social Provider by User Name command does not explicitly return a Success code. Instead, it outputs the template id and name in plain text format. Use the Output Format argument to return the results in an alternate format.
FAILURE
A Get Social Provider by User Name command will fail for several reasons, such as if no Social Providers exist in the realm. The result format is:
FAILURE: [Reason]
Comments