Tuyu Developers

Developers

Customize the URLs on this site with your Tuyu URL:

https:// .
Method Documentation > Users and Workspaces

User Info GET

Description

Retrieves all relevant info on a site user.

URL

All responses are in JSON format by default, to specify an XML response add “.xml” to the end of the method name (in this case “user_info”)

https://<your subdomain>.<your domain>/api/user_info

Restrictions

The calling user must have:

  • Admin privileges for the site.

Parameters

Bold indicates required. Please note parameters must be appended to the URL in alphabetical order, except for “signature”, which is always at the end.

Parameter Description
api_key Your API Key.
timestamp The current time in Unix timestamp format.
user_id The ID of the user.
signature Please see “User Authentication” for more information.

Sample Response

Successful response In JSON:

{"userInfo":
{
    "id":1,
    "username":"johndoe",
    "firstName":"John",
    "lastName":"Doe",
    "email":"john@doe.com",
    "organization":"Acme Inc.",
    "phone":"1234567890",
    "phoneExt":null,
    "created":"04/07/15 at 09:05 am EDT",
    "modified":"05/27/15 at 09:26 am EDT"
    "admin": 0,
    "uploadFiles": 1,
    "batchUploadFiles": 1,
    "sendFiles": 1,
    "sendFilesNonUser": 0,
    "downloadFiles": 1,
    "batchDownloadFiles": 0,
    "moveCopyFiles": 0,
    "batchMoveCopyFiles": 0,
    "renameFiles": 1,
    "deleteFiles": 0,
    "batchDeleteFiles": 0,
    "createFolders": 1,
    "resetPassword": 0,
    "allFutureWorkspaces": 0,
    "uploadNotifications": 1,
    "downloadNotifications": 1,
    "workspaces": [
        {'workspace': {'id': 1, 'name': 'Workspace 1'}},
        {'workspace': {'id': 2, 'name': 'Workspace 2'}}
    ]
}
}

Successful response in XML:

<userInfo>
    <id>1</id>
    <username>johndoe</username>
    <firstName>John</firstName>
    <lastName>Doe</lastName>
    <email>john@doe.com</email>
    <organization>Acme Inc.</organization>
    <phone>1234567890</phone>
    <phoneExt>null</phoneExt>
    <created>04/07/15 at 09:05 am EDT</created>
    <modified>05/27/15 at 09:26 am EDT</modified>
    <admin>0</admin>
    <uploadFiles>1</uploadFiles>
    <batchUploadFiles>1</batchUploadFiles>
    <sendFiles>1</sendFiles>
    <sendFilesNonUser>0</sendFilesNonUser>
    <downloadFiles>1</downloadFiles>
    <batchDownloadFiles>0</batchDownloadFiles>
    <moveCopyFiles>0</moveCopyFiles>
    <batchMoveCopyFiles>0</batchMoveCopyFiles>
    <renameFiles>1</renameFiles>
    <deleteFiles>0</deleteFiles>
    <batchDeleteFiles>0</batchDeleteFiles>
    <createFolders>1</createFolders>
    <resetPassword>0</resetPassword>
    <allFutureWorkspaces>0</allFutureWorkspaces>
    <uploadNotifications>1</uploadNotifications>
    <downloadNotifications>1</downloadNotifications>
    <workspaces>
        <workspace>
            <id>1</id>
            <name>Workspace 1</name>
        </workspace>
        <workspace>
            <id>2</id>
            <name>Workspace 2</name>
        </workspace>
     </workspaces>
</userInfo>

Error response In JSON:

{"error":{
    "title":""User Info Failed",
    "message":"You must be an administrator to call this method"}
}

Error response In XML:

<error>
    <title>'User Info Failed</title>
    <message>You must be an administrator to call this method</message>
</error>