ActivateHostedProduct

Description

The ActivateHostedProduct action takes in an activation
key for the customer and the product token for your product
and responds with a persistent identifier (PID) and user
token for a customer. Whether your product uses one or both of these depends on
the type of product and its needs:

If you want to use query string authentication with your web product (for more
information, see Query String Authentication with Web Products), you
must have a user token returned by a call made to ActivateHostedProduct after
May 15, 2008. You can update any user token so that it works with query
string authentication by calling RefreshUserToken.

Activation succeeds regardless of whether the credit card the customer presents at sign-up time
is valid. Even though activation succeeds, your product shouldn't send requests to Amazon S3 until
the customer is actually subscribed (which depends on the credit card vetting or sign-up charge
succeeding). For more information about how to confirm when a customer is actually subscribed, see
Activation and Subscription Timing.

Request Parameters

Name

Description

Required

Action

The License Service action to perform. Set this to
ActivateHostedProduct.

Type: String

Default: None

Condition: Required for REST-Query requests (for more information, see
REST-Query Requests).
For SOAP requests, the action is automatically indicated in the SOAP request's
root element (for more information, see SOAP Requests).

Condition: Required for REST-Query requests. Not applicable to SOAP
requests.

Conditional

Expires

The date and time at which the signature included in the request
expires.

Type: String in the format YYYY-MM-DDThh:mm:ssZ, as specified in the ISO
8601 standard.

Default: None

Condition: REST-Query requests must include either the
Timestamp parameter or the
Expires parameter, but not both. For information
about handling message expiration for SOAP requests, see Message Expiration.

Conditional

ProductToken

The product token for your product, which is obtained during product
registration. For more information about registration, see Registering Your Product. The product
token is prefixed with the literal string
{ProductToken}.

Condition: Required for REST-Query requests. Not applicable to SOAP
requests.

Conditional

SignatureVersion

A legacy parameter AWS requires. Set this value to
1.

Type: String

Default: None

Condition: Required for REST-Query requests. Not applicable to SOAP
requests.

Conditional

Timestamp

The date and time the request is signed.

Type: String in the format YYYY-MM-DDThh:mm:ssZ, as specified in the ISO
8601 standard.

Default: None

Condition: Authenticated REST-Query requests must include either the
Timestamp parameter or the
Expires parameter, but not both. For information
about handling message expiration for SOAP requests, see Message Expiration.

Conditional

TokenExpiration

The amount of elapsed time (in seconds) before the user token returned by
the service should expire. The user token never expires unless you use this
optional parameter.
Once the user token expires, the product must reactive itself, or the customer
won't be able to use it. For more information, see Reactivating the Product.

Type: xsd:duration (in seconds)

Default: No expiration time

No

Version

The version of the API to use. For example:
2008-04-28

Type: String

Default: 2007-06-05

Condition: Highly recommended for REST-Query requests. Not applicable to
SOAP requests (the API version is indicated in the namespace).

Conditional

Response Elements

The response to this action contains the following elements in addition to the elements returned
in all successful responses. For more information, see Structure of a Successful Response.

The user token, which is prefixed with the literal string
{UserToken}. This is used by Amazon S3 web products (for more
information, see Setting Up Web Products). The user
token length varies, and we recommend you allot 1024 characters to store the
value in your database. Note that the user token length is currently much
shorter than this, but it could increase or decrease without notice.

Each time you request ActivateHostedProduct for a
particular customer, the user token you receive is different because the
creation time is part of the information included in the token.

Type: String

Ancestor: ActivateHostedProductResult

Errors

The errors listed in the following table are returned in addition to the errors returned by all
actions. For more information, see Errors.

Important

We might throttle requests to the License Service as necessary. When we throttle, we
return a 503 (service unavailable) HTTP status code. Your system should be prepared to retry
any request that receives a 503 code.

Name

Description

ExpiredActivationKey

The activation key is expired. Activation keys expire one hour after
creation.

Action to take:

Prompt the customer to go to the activate URL
and generate a new activation key (the customer is asked to log in
with an Amazon.com login).

Prompt the customer for the new activation key.

Repeat the request to activate the product with the new activation
key and the other required parameters.

IncorrectActivationKey

The activation key does not correspond to the product token. Each
activation key is associated with a particular customer and a particular
product. This error occurs if you provide an activation key for a DevPay
product other than the one represented by the product token.

Action to take: Follow the instructions listed for
ExpiredActivationKey.

InvalidActivationKey

The activation key is invalid or malformed.

Action to take: Same action as for
ExpiredActivationKey.

InvalidProductToken

The product token is invalid for the signer.

Action to take: Make sure you have copied the product token correctly.
You can view the product token for your product at any time by clicking
View Product Details on your DevPay Activity page (at
http://aws.amazon.com/devpayactivity).

Examples

The following example REST-Query request gets the user token and PID for a customer.