# SDK overview

> Connect to Bitiful S4 with S3 SDKs: connection settings, SDK entry points for each language, recommendations for direct client uploads, and general notes.

S4 is compatible with the S3 protocol. To use any S3 SDK or tool, you only need to change the four settings below:

| Setting           | Value                    |
| :---------------- | ------------------------ |
| Endpoint          | `https://s3.bitiful.net` |
| Region            | `cn-east-1`              |
| Access Key ID     | Sub-user AccessKey       |
| Secret Access Key | Sub-user SecretKey       |

Create keys in the console under **Object Storage (对象存储) › [Sub-users & Keys (子账户\&Key)](https://console.bitiful.com/accessKey)**. See [Sub-users and AccessKeys](https://docs.bitiful.com/en/bitiful-s4/handbook/access-keys.md).

> **Warning**
>
> A new sub-user has no permissions. [Grant access to a bucket or directory](https://docs.bitiful.com/en/bitiful-s4/handbook/permissions.md) first, or every request returns `403 AccessDenied`.

## Server-side SDKs

Each page covers uploads, multipart uploads, downloads, listing, copy and move, deletion, presigned URLs, S4 extension parameters, and error handling.

[**Node.js**](https://docs.bitiful.com/en/developer/sdk/nodejs-demo/start-to-use.md)

AWS SDK for JavaScript v3

[**Go**](https://docs.bitiful.com/en/developer/sdk/golang-demo/start-to-use.md)

AWS SDK for Go v2

[**Python**](https://docs.bitiful.com/en/developer/sdk/python3-demo/start-to-use.md)

Boto3

[**Java**](https://docs.bitiful.com/en/developer/sdk/java-demo/start-to-use.md)

AWS SDK for Java 2.x

[**PHP**](https://docs.bitiful.com/en/developer/sdk/php-demo/start-to-use.md)

AWS SDK for PHP 3.x

[**.NET**](https://docs.bitiful.com/en/developer/sdk/dotnet-demo/start-to-use.md)

AWS SDK for .NET 4.x

[**Rust**](https://docs.bitiful.com/en/developer/sdk/rust-demo/start-to-use.md)

AWS SDK for Rust

[**Ruby**](https://docs.bitiful.com/en/developer/sdk/ruby-demo/start-to-use.md)

AWS SDK for Ruby 3.x

## Clients

Never embed an AccessKey in a web page, app, or mini program, and never deliver one through an API. Have your server issue presigned URLs so clients upload and download directly. For how this works, see [Upload files securely from clients](https://docs.bitiful.com/en/best-practice/web-uploads.md).

[**Browser JavaScript**](https://docs.bitiful.com/en/developer/sdk/browser-demo/start-to-use.md)

Direct uploads with progress, multipart uploads for large files

[**Android**](https://docs.bitiful.com/en/developer/sdk/android-demo/start-to-use.md)

Kotlin and OkHttp

[**iOS / Swift**](https://docs.bitiful.com/en/developer/sdk/swift-demo/start-to-use.md)

URLSession

## Command-line tools

[**AWS CLI and s5cmd**](https://docs.bitiful.com/en/best-practice/solutions/aws-cli.md)

Upload, sync, and batch operations

[**Rclone**](https://docs.bitiful.com/en/best-practice/solutions/rclone.md)

Sync, migration, and mounting

[**Bitifs**](https://docs.bitiful.com/en/best-practice/solutions/bitifs.md)

Mount a bucket as a local folder

## General notes

| Item               | Notes                                                                                                                                      |
| :----------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Addressing style   | Both virtual-hosted style (`bucket-name.s3.bitiful.net`) and path style are supported; use the SDK default                                 |
| Signature version  | Use Signature V4. STS temporary credentials are not supported                                                                              |
| Checksums          | The default upload checksums of recent SDKs work as is; you do not need to disable Payload Signing                                         |
| Listing            | Each page returns 100 entries by default; use a paginator and do not assume everything is returned at once                                 |
| Large files        | Use multipart upload above 100 MB; each part is 5 MiB to 20 GiB, with up to 10000 parts                                                    |
| Conditional writes | `If-None-Match` and `If-Match` are supported. See [Conditional requests](https://docs.bitiful.com/en/developer/s3/conditional-requests.md) |
| Move               | Native move is supported. See [Move and rename objects](https://docs.bitiful.com/en/bitiful-s4/features/move-object.md)                    |
| Retries            | The SDK retries 5xx responses automatically; rate limiting returns 429, which some SDKs do not retry automatically, so handle it yourself  |
| Client reuse       | Clients in every language can be used concurrently; create one per process                                                                 |

For the support status of each operation, see [S3 API compatibility](https://docs.bitiful.com/en/developer/s3/compatibility.md).

## Why we recommend the S3 protocol

S3 is the de facto standard for object storage, supported by [Alibaba Cloud OSS](https://help.aliyun.com/zh/oss/developer-reference/compatibility-with-amazon-s3-1/), [Tencent Cloud COS](https://cloud.tencent.com/document/product/436/37421), [Qiniu Kodo](https://developer.qiniu.com/kodo/4086/aws-s3-compatible), [AWS S3](https://aws.amazon.com/cn/s3/), [Cloudflare R2](https://www.cloudflare.com/zh-cn/developer-platform/r2/), and others.

Standardizing your team on the S3 protocol avoids lock-in to a single vendor: switching storage only requires changing the endpoint and keys.
