Menu
Amazon DevPay
Developer Guide (API Version 2007-12-01)

VerifyProductSubscriptionByTokens

Description

The VerifyProductSubscriptionByTokens action lets desktop products verify whether the customer who purchased and installed the product is actively subscribed to it (that is, the customer hasn't canceled the subscription). For example, a desktop product might call VerifyProductSubscriptionByTokens each time the customer opens the product. If the subscription is no longer active, the desktop product can disable the customer's access.

Important

You must use REST-Query to access this action; using SOAP is not allowed for this action.

Request Authentication

Requests for VerifyProductSubscriptionByTokens must be made over HTTPS and authenticated by AWS. For more information, see Authentication of REST-Query Requests.

Important

The desktop product must sign the request using the customer's Secret Access Key and Access Key ID (which were obtained from a previous request the desktop product made to ActivateDesktopProduct ).

Request Parameters

Name Description Required

Action

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

Type: String

Default: None

Yes

AWSAccessKeyId

The Access Key ID of the customer, which the desktop product obtained from a request to ActivateDesktopProduct.

Type: String

Default: None

Yes

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: The request must include either the Timestamp parameter or the Expires parameter, but not both.

Conditional

ProductToken

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

Type: String

Default: None

Yes

Signature

A request signature. For more information, see Calculating an HMAC-SHA1 Request Signature. You must use the customer's Secret Access Key and Access Key ID instead of your own when creating the signature.

Type: String

Default: None

Yes

SignatureVersion

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

Type: String

Default: None

Yes

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: The request must include either the Timestamp parameter or the Expires parameter, but not both.

Conditional

UserToken

The user token for the customer, which the desktop product received from a request to ActivateDesktopProduct. The user token is prefixed with the literal string {UserToken}.

Type: String

Default: None

Yes

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.

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.

Name Description

Subscribed

Whether the customer is currently subscribed to your product.

Type: Boolean

Valid Values: true | false

Ancestor: VerifyProductSubscriptionByTokensResult

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

InvalidClientTokenId

Authentication failure. Note that an invalid user token or product token might also trigger this error.

Action to take: Make sure you have copied the product token and user token correctly and that you use the correct credentials when you sign the request. 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).

InvalidProductToken

The product token is invalid for the signer.

Action to take: Make sure you have copied the product token correctly and that you use the correct credentials when you sign the request. 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).

InvalidParameterValue

One or more of the parameters required in the request is missing or invalid.

Examples

The following example REST-Query request verifies if a customer is still subscribed to the product.

Sample Request

https://ls.amazonaws.com/
?Action=VerifyProductSubscriptionByTokens
&ProductToken={ProductToken}AAAHVXNlclRrbgfOpSykBA....[long encoded token]...
&UserToken={UserToken}AAAHVXNlclRrbgfOpSykBAXO7g/zG....[long encoded token]...
&Version=2008-04-28
&AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE
&Timestamp=2008-05-19T12:00:00Z
&Signature=Dqlp3Sd6ljTUA9Uf6SGtEExwUQEEXAMPLE=
&SignatureVersion=1

Sample Response

<VerifyProductSubscriptionByTokensResponse>
   <VerifyProductSubscriptionByTokensResult>
      <Subscribed>
         true
      </Subscribed>
   </VerifyProductSubscriptionByTokensResult>
   <ResponseMetadata>
      <RequestId>
         cb919c0a-9bce-4afe-9b48-9bdf2412bb67
      </RequestId>
   </ResponseMetadata>
</VerifyProductSubscriptionByTokensResponse>

Related Actions