Overview

更新时间:
复制 MD 格式

After you integrate the Captcha access code on your frontend, you need to integrate the Captcha server-side software development kit (SDK) on your server.

Prerequisites

An AccessKey for your Alibaba Cloud account is required. If you have not created one, see Create an AccessKey.

Important

Do not use the AccessKey of your Alibaba Cloud account. If the AccessKey is leaked, all your cloud resources are at risk. Instead, use the AccessKey of a Resource Access Management (RAM) user to reduce the threat of a leak. To use Alibaba Cloud Captcha, grant the RAM user the AliyunYundunAFSFullAccess permission.

Procedure

  1. In the Alibaba Cloud Captcha console, go to the System Code Integration & Test page for your service configuration and download the server-side SDK package for your developer environment.

    Developer environment (Language version)

    Server-side SDK package version requirements

    Java

    J2SE Development Kit (JDK) 1.5 or later

    .NET

    .NET Framework 4.0 or later

    PHP

    PHP 5.3 or later

    Python

    Python 2.7 or later

  2. Extract the SDK package and add it to your server-side project.

  3. Refer to the server-side code sample for your programming language to develop a handler class that processes frontend page requests.

    Important

    Replace YOUR ACCESS_KEY and YOUR ACCESS_SECRET in the sample code with your AccessKey ID and AccessKey secret.

  4. Refer to the server-side code sample for your programming language to handle the results that are returned by the Captcha object.

    Important

    When you develop the result handler, ensure that it can handle potential server-side faults.

For more information about how to integrate the server-side SDK in different developer environments, see: