API.addSubscriberDRMSingle - Calaméo Knowledge Base
Not a Calaméo member yet?
Sign up now! It's FREE!
Get the latest news on Calaméo
Follow us on Facebook
Get Calaméo updates in real-time
Follow us on Twitter

API.addSubscriberDRMSingle

From Calaméo Knowledge Base

This action allows you to allow a subscriber to access a specific publication.

Contents

Request

Note: This feature is only available to PREMIUM and PLATINUM users. Click Here To Upgrade.
The API key must have the subscribers_write access right.
Name Required Type Description
apikey yes string API public key
signature yes string Signature of the request. See How To Sign Your Requests.
expires yes timestamp UNIX timestamp for request expiration (GMT).
output string Format of the response. Either XML (default), JSON or PHP.
subscription_id yes integer ID of the subscription.
login yes string Login of the subscriber.
book_id yes string Unqiue ID of the publication. Publication must be private and authorize access to subscribers.
extras string Free field of up to 255 characters

Response

Name Type Description
ID integer ID of the DRM.
SubscriptionID integer Signature of the request. See How To Sign Your Requests.
SubscriberLogin string UNIX timestamp for request expiration.
Book Publication Publication.
Extras string Free field up to 255 characters.

Example responses

JSON

{
  response: {
    requestid: ...,
    requests: ...,
    status: ok,
    content: {
      ID: ...,
      SubscriptionID: ...,
      SubscriberLogin: ...,
      Book: {
        ID: ...,
        AccountID: ...,
        SubscriptionID: ...,
        Name: ...,
        Description: ...,
        Status: ...,
        IsPublished: ...,
        IsPrivate: ...,
        AuthID: ...,
        AllowMini: ...,
        Date: ...,
        Pages: ...,
        Width: ...,
        Height: ...,
        Views: ...,
        Downloads: ...,
        Comments: ...,
        Favorites: ...,
        Creation: ...,
        Modification: ...,
        PictureUrl: ...,
        ThumbUrl: ...,
        PublicUrl: ...,
        ViewUrl: ...
      },
      Date: ...,
      Extras: ...
    }
  }
}

Error codes

See the Error Code Section.