Troubleshoot common issues

Prev Next

Available in Classic and VPC

You might run into the following problems when using API Gateway. Find out causes and possible solutions.

API Call Errors

API calls using IAM authentication does not call the API as intended.

Cause

There may be various causes depending on the user's task environment.

  • A wrong URL was used when creating signature values.
  • The method used to create the Signature key is different from the API called.
  • A wrong timestamp was used when creating signature values.
  • The server time of the client is not correct.
  • The accessKey value is not valid.

Solution

Wrong URL used during signature creation
Use the path (without the domain) and all query strings when creating signatures. If the API you are trying to call is https://uh7m0wgsis.apigw.ntruss.com/photos/puppy.jpg?query1=&query2, the URL used to create the signature is /photos/puppy.jpg?query1=&query2.

The method used in creating the signature is different from the API called
The API called must be the same as the method used to create signatures in order for the API to be called successfully. Check if the API called is the same as the method used in creating signatures.

Wrong timestamp used to create signatures

  • The same timestamp value must be used in header(x-ncp-apigw-timestamp) and during signature creation. If the call fails, check if the timestamp value of the header and the signature has not been obtained separately.
  • Check if the obtained timestamp value has been used without renewing.
  • The timestamp value is considered invalid when the time difference with the API Gateway server exceeds 5 minutes. When using obtained timestamp values without renewal, errors manifest after a few initial calls; this makes the error seem like an intermittent error. Create a new timestamp value when calling APIs.

When the client's server time is not correct
An incorrect client server time causes the API Gateway to consider the timestamp value invalid, which might prevent the API from being called successfully. Check if the client server time is correct.

When the accessKey value is invalid
An IAM certification error might occur when the accessKey value is invalid. Use a valid accessKey when calling APIs.

Restoring the API Key

A deleted API Key cannot be recovered.

Cause

A deleted API Key cannot be recovered.

Solution

Take care not to delete API Keys currently in use as deleted API Keys cannot be recovered.

CORS error

A CORS error occurs.

Cause

Errors might occur when CORS configuration has not been completed.

Solution

Complete the CORS configuration of the API Gateway resource. For more information, see Resource CORS Configuration.

Cannot designate private IPs in VPC as an Endpoint

Designating internal VPCs as the URL of HTTP(S) for the Endpoints processed by the API Gateway fails.

Cause

Private IPs within the VPC cannot be designated as the Endpoint of API Gateways.

Solution

  • Designate a public IP or an externally accessible domain as the Endpoint.
  • Set the domain as externally accessible using Public Load Balancers, etc. and connect the endpoint.
Note

If you're still having trouble finding what you need, click on the feedback icon and send us your thoughts and requests. We'll use your feedback to improve this guide.