thumbnail.get
This method retrieves a URL to the thumbnail of a document, in a given size. Note that docs.getSettings and docs.getList also retrieve thumbnail URLs in default size - this method is really for resizing those. IMPORTANT - it is possible that at some time in the future, Scribd will redesign its image system, invalidating these URLs. So if you cache them, please have an update strategy in place so that you can update them if neceessary.
Parameters
| Name | Type | Description |
|---|
| doc_id | integer | (required)
The ID of the document. It must be a public document, or one that your account controls.
|
| width | integer | (optional)
Width in px of the desired image. If not included, will use the default thumb size.
|
| height | integer | (optional)
Height in px of the desired image. If not included, will use the default thumb size.
|
| api_key | string | (required)
API key assigned to your account.
|
| api_sig | string | (optional)
MD5 hash of the active request and your secret key. This is an optional security measure. See the signing documentation for more info.
|
| session_key | string | (optional)
A session key for a signed in user. If this parameter is provided, your application will carry out actions on behalf of the signed in user corresponding to the session key. Otherwise, your application will carry out actions on behalf of the user account associated with the API account. See the authentication documentation for more information
|
| my_user_id | string | (optional)
This parameter is intended for sites with their own user authentication system. You can create phantom Scribd accounts that correspond to your users by simply passing the unique identifier you use to identify your own user accounts to my_user_id. If you pass this parameter to an API method, the API will act as if it were executed by the phantom user corresponding to my_user_id. See the authentication documentation for more information.
|
Sample return XML
<?xml version="1.0" encoding="UTF-8"?>
<rsp stat="ok">
<thumbnail_url>http://imgv2-2.scribdassets.com/img/word_document/1/111x142/ff94c77a69/1277782307</thumbnail_url>
</rsp>
Result explanation
| Name | Type | Description |
|---|
| thumbnail_url | string |
URL to thumbnail
|
Error codes
| 401 | Unauthorized |
| 500 | Internal Server Error. Scribd has been notified about this problem. |
| 601 | Required parameter missing |
| 611 | Insufficient permissions to access this document |
| 612 | Document could not be found |
| 655 | Must pass either both width and height, or neither (for default size) |
| 656 | Invalid parameter value for width or height |
| 657 | Invalid page value |
Back to Platform API Reference