All Products
Search
Document Center

:Endpoint errors occur when you access buckets in OSS through SDKs

Last Updated:Jul 11, 2023

Problem description

The following error is reported when you access a bucket in OSS by using the SDK.

The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint

Cause

The error message returned because the Endpoint parameter is not specified or the specified parameter is incorrect. For example, if a bucket is created in the Qingdao region and a request is made using the default configured oss-cn-hangzhou.aliyuncs.com Hangzhou Endpoint address, this error occurs.

Solutions

Make sure that the endpoint of the request is the same as the actual endpoint of the bucket. To access the buckets of the Qingdao and Hangzhou nodes, create multiple ossclients. When you define the endpoints, add the addresses of the Qingdao and Hangzhou regions.

References

Applicable scope

  • Object Storage Service (OSS)