get_user_folders

The get_user_folders method retrieves a list of a user's current and deleted folders.

Syntax

{
    <credentials object> 
    "user": <mailbox_name>
}

Request fields for get_user_folders

The following fields can be used in the get_user_folders method:

Field name

Obligation

Definition/Value

user

Required

The user's account name.

Response fields for get_user_folders

The following fields may be returned in response to the get_user_folders method:

Field name

Obligation

Description/Value

deleted_folders

Returned if success = true

A list of the user's deleted folders.

error

Returned if success = false

A text string that explains the error.

error_number

Returned if success = false

A number that represents the error.

folders

Returned if success = true

A list of the user's existing folders. Sub folders are listed by their whole path, and are dot separated.

success

Always returned

Indicates whether the request was successful or not. Allowed values are true and false.

Examples for get_user_folders

Request

{
  "credentials": {
    "user": "[email protected]",
    "password": "pencil75"
  },
  "user": "[email protected]"
}

Response

{
  "success": true,
  "folders": [
    "INBOX",
    "Spam",
    "Drafts",
    "Trash",
    "Sent Items",
    "2011",
    "plus ça change",
    "2011.Q2",
    "2011.Q1",
    "2011.Q3",
    "2011.Q4",
    "2011.Q1.January Pictures of Kitties"
  ],
  "deleted_folders": [
    "plus ça change.bananas"
  ]
}