Skip to content

Commit c7de461

Browse files
authored
Merge pull request #19 from Short-io/docs/alternative-api-hosts
add alternative API hosts to README
2 parents 934a59f + d0436f5 commit c7de461

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,28 @@ The original URL is encrypted with AES-128-GCM before being sent to the Short.io
643643

644644
## Advanced Configuration
645645

646+
### Alternative API Hosts
647+
648+
The SDK connects to `https://api.short.io` by default. Short.io also provides alternative hosts for enterprise and China-region users:
649+
650+
| Host | Use Case |
651+
|------|----------|
652+
| `https://api.short.io` | Default |
653+
| `https://enterprise-api.short.io` | Enterprise customers |
654+
| `https://api.shortio.cn` | China region |
655+
656+
To use an alternative host, set the `baseUrl` when configuring the client:
657+
658+
```javascript
659+
import { client, setApiKey } from "@short.io/client-node";
660+
661+
setApiKey("YOUR_API_KEY");
662+
663+
client.setConfig({
664+
baseUrl: "https://enterprise-api.short.io"
665+
});
666+
```
667+
646668
### Custom Client Configuration
647669

648670
```javascript

0 commit comments

Comments
 (0)