Skip to main content

Access Guide

Prerequisites

Before using the Cloud Development HTTP API, ensure that you meet the following conditions:

  • Have a CloudBase platform account.
  • Have a basic understanding of the HTTP protocol and RESTful API design principles.
  • Be familiar with the programming language and development environment of your choice.

Register and Create Environment

Register for CloudBase and Enable the Environment

Access CloudBase and enable an environment. If you already have an account, log in directly.

Environment Configuration

Security Domain Configuration

If it is a web application, you need to configure Security Domain first to support CORS cross-origin requests.

Authentication and Authorization

Understanding Authentication Mechanisms

Familiarize yourself with the User Authentication mechanism supported by the CloudBase platform, and select the authentication method suitable for your application scenario.

Authentication Method Comparison

  1. AccessToken

    • Applicable identity: User identity
    • Applicable Environment: Client/Server
    • Description: Commonly used for client applications (such as mobile apps, Web frontends) to access backend services, supporting fine-grained access control over user identities.
  2. Tencent Cloud Signature V3

    • Applicable identity: Developer identity
    • Applicable Environment: Server-side
    • Description: Applicable to communication between servers, especially for management operations requiring high security, such as the creation, update, and deletion of cloud resources.

Notes

  • AccessToken typically has a short validity period and requires regular refreshing.

Implementing User Authentication

Integrate the user authentication flow into your application based on the selected authentication method.

For specifics, refer to User and Authentication Related Interfaces

Getting Operational Permissions

Ensure that your application can obtain the necessary operational permissions after authentication, such as database access, file storage, and cloud function invocation.

When accessing interfaces using accessToken, you can control the permissions for users and roles to access each interface via Policy Management.

Quick Start

Select API Interface

Based on your requirements, select the appropriate API interface for your operations.

Read API Documentation

Thoroughly read the usage instructions for the selected interface, including the request method, request parameters, request headers, and request body.

Get AccessToken

In the cloud development platform, an AccessToken must be provided when calling most interfaces. Please refer to Get AccessToken

Send the First Request

Use Cloud Development Interface Online Debugging or directly send your first API request via an HTTP client and check the response.

Error Handling

Understand Error Responses

Understand the possible error response format returned by the API, including status codes and error messages.

Implement Error Handling Logic

Implement error handling logic in your application to ensure that potential issues in API calls can be properly handled.

Debugging and Testing

Using Logs

Use logs to record API calls and responses to help debug and monitor application status.

API Online Debugging

Use the Online Debugging Tool provided by the Cloud Development Platform to test API calls and ensure correct functionality.