All Products
Search
Document Center

API Gateway:Troubleshoot errors in the error code table

Last Updated:Feb 11, 2025

API unsupport the channel

Causes

The HTTP schema in the request is invalid.

Different APIs support different HTTP schemas. API providers can configure supported HTTP schemas on their own. For example, they can configure to allow only HTTP requests, only HTTPS requests, or both HTTP and HTTPS requests.

API unsupport the channel: This error is reported when an HTTP request is initiated to call an API that supports only HTTPS requests.

API unsupport the channel: This error is reported when an HTTPS request is initiated to call an API that supports only HTTP requests.

Solutions

API unsupport the channel: Initiate an HTTPS, instead of HTTP, request to call the API.

API unsupport the channel: Initiate an HTTP, instead of HTTPS, request to call the API.

A403IS

Causes

The signature provided by the client does not match the server-side signature.

Solutions

If the signatures do not match, API Gateway returns the StringToSign parameter that is used to calculate the server-side signature in the X-Ca-Error-Message response header.

The StringToSign parameter contains a string that is used to calculate a signature before a request is sent. For more information, see Use digest authentication to call an API.

You can obtain the local StringToSign and compare it with the StringToSign returned in the response for difference and adjustment. If you used the official demo to make the call, you can obtain the StringToSign that was used for signature calculation by using the signature calculation tool class.

Because line breaks are not allowed in HTTP response headers, line breaks in the StringToSign parameter are removed in the response. Refer to documentation and compare the strings properly.

If the client-side and server-side strings are consistent, check whether the AppKey and AppSecret used are valid. For example, check whether the AppKey and AppSecret contain extra spaces.

Invalid Url

Causes

The HTTP method, path, or environment (X-Ca-Stage) specified in the request is invalid.

For example, the request was made to call an API in the testing environment, but the API was not published in the testing environment.

Notes:

  • If you do not specify an environment in your request, the request is sent to the production (RELEASE) environment by default.

  • If you modify the definition of an API, the API must be republished for the modification to take effect. In many cases, this error is reported because the API is not republished after its path is modified but the new path is specified in the request.

Solutions

Check your request or API based on the preceding three factors: HTTP method, path, and environment.

  1. Specify the same HTTP method in your request as the API definition. For example, if an API needs to be called in the POST method, do not specify GET in your request.

  2. Specify the path in your request based on the actual path in use. If you own the API, remember to republish it after you modify it.

  3. Specify the environment in which you want to call the API. Use the X-Ca-Stage header in your request. Valid values: TEST, PRE, and RELEASE, which indicate the test environment, staging environment, and production environment respectively. If you do not specify the header, your request is sent to the production environment by default.

Unauthorized

Causes

The application is not authorized to call the API.

Solution

Try the following solutions:

  1. If you created the API, create an application and authorize the application to call the API in the API Gateway console. In other words, an application is required to call an API even if you own the API and you are calling it only for testing.

  2. If you purchased the API, you can view the APIs that you can call by using a specific application in the application details page. If the API that you want to call is not displayed on the page, you must obtain authorization for the application on your own.

  3. If you called an API that belongs to your partner, contact the partner for authorization. In this case, you must provide your application ID (AppId) for your partner to authorize the application.

  4. Authorizations are environment dependent. Your authorized application cannot be used to call the same API in a different environment.

  5. Check whether you used the correct application and called the correct API. Callers use a wrong application or call a wrong API when there are many applications or APIs.