share.open
Opens the phone's share sheet with text from your app.
Hands text to the system share sheet. The person chooses where it goes; your app never sees the destination.
| Property | Value |
|---|---|
| Scope | None (open method) |
| Who can use it | Any developer |
| Status | Available |
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Up to 16,384 characters. |
Result
| Field | Type | Description |
|---|---|---|
ok | boolean | true when the sheet opened. |
Errors
| Code | When |
|---|---|
-32602 | A parameter is missing, has the wrong type or is over its limit. |
4200 | The phone could not do it right now. |
4290 | More than 30 requests in 10 seconds. |
See Error Codes for every code and how they reach your page.
Example
await window.aksa.request({
method: "share.open",
params: { text: "I read 4 pages of the Qur'an today on Aksa" },
});With AksaMini
If your page embeds aksa-mini.js, use its wrapper:
await AksaMini.share("I read 4 pages of the Qur'an today on Aksa");Notes
- Share only what the person expects to share. Do not include personal data they did not enter.
Used By
Ready To Build Or Ship?
Check your files, preview on an iPhone frame, and submit in the Developer Studio.