| Platform | SDK surface |
|---|---|
| TypeScript | Client.getShareableLinkConfiguration() returns helper methods such as generateLink, getPattern, and isEnabled. |
| iOS | client.getShareableLinkConfiguration() returns domain and patterns. |
| Android | AmityCoreClient.getShareableLinkConfiguration().getShareableLink() returns domain and patterns. |
| Flutter | No public shareable-link configuration API was found in the current Flutter SDK source. |
The SDK reads the configured patterns. It does not create the destination screens in your app. Your app still needs routes that can open the generated URLs.
Parameters
| Operation | Parameter | Required | Description |
|---|---|---|---|
| Fetch configuration | None | No | Reads the network-level shareable-link configuration. |
| Generate a post link | postId | Yes | Post ID used to replace {postId} in the configured URL pattern. |
| Generate a post link | posts pattern | Yes | Pattern returned by the backend configuration for post links. |
| Generate a post link | domain | Yes | Configured shareable-link domain returned by the SDK. |
Supported Pattern Keys
TypeScript maps content types to these pattern keys:| Content type | Pattern key | Placeholder |
|---|---|---|
| Post | posts | {postId} |
| Community | communities | {communityId} |
| User | users | {userId} |
| Livestream | livestream | {livestream} |
| Event | events | {eventId} |
patterns map directly. Check that the key you need exists before generating a link.
Generate a Post Link
Fetch the shareable-link configuration before generating a post link, then fall back gracefully if the needed pattern is missing.Generate an Event Link
Event links are the primary use case for shareable links: an app can copy or share a direct link to an event detail screen. Gate the share UI onisEnabled first, then generate the link — generateLink returns null when the event pattern is not configured.
Shareable links are available on TypeScript, iOS, and Android. Flutter has no public shareable-link configuration API in the current SDK source.
Best Practices
- Treat missing patterns as a disabled share target for that content type.
- Generate links only after the content exists and you have the final content ID.
- Keep app route handling separate from link generation so deleted or restricted content can show a useful fallback screen.
- Cache the configuration during a session if your sharing UI needs it often.
Related Topics
Posts Overview
Learn how posts are modeled and created.
Communities
Share community destinations after configuring community URL patterns.
User Management
Share user profile destinations after configuring user URL patterns.
Events
Share event links after configuring the event URL pattern.