Exports

919PHONE exposes a small set of exports for other resources to send notifications, mail, look up phone identity, moderate social posts, and perform admin actions. All exports use the resource name amzn_smartphone.


SDK exports

See also SDK Getting Started and SDK API Reference.

`registerApp` (client + server)

Registers an external app with the phone.

local ok, reason = exports['amzn_smartphone']:registerApp({
    id = 'myapp',
    label = 'My App',
    icon = 'fa-star',
    color = '#0a84ff',
    category = 'appstore',
    ui = 'web/index.html',
})

`unregisterApp` (client + server)

Removes a previously registered external app owned by the calling resource.

exports['amzn_smartphone']:unregisterApp('myapp')

`sendAppMessage` (client)

Pushes a message to an open external app iframe.

exports['amzn_smartphone']:sendAppMessage('myapp', 'refresh', { updated = true })

`sendAppMessage` (server)

Pushes a message to a player's open external app iframe.

exports['amzn_smartphone']:sendAppMessage(source, 'myapp', 'refresh', { updated = true })

Only the resource that registered myapp can send messages for it.


Server exports

`notify`

Sends a notification to a player's phone. Blocked when the player has airplane mode enabled.

exports['amzn_smartphone']:notify(source, {
    app       = 'My App',           -- optional - shown as the app name
    icon      = 'fa-bell',          -- optional - Font Awesome icon
    iconColor = '#0a84ff',          -- optional - hex color
    title     = 'Hello',
    body      = 'Something happened.',
    timeout   = 5000,               -- optional - ms before auto-dismiss (default 5000)
})

Parameters

Field Type Required Description
source number Yes Player server ID
data.title string Yes Notification title
data.body string Yes Notification body
data.app string No App label shown on the banner
data.icon string No Font Awesome icon class
data.iconColor string No Icon background color (hex)
data.timeout number No Auto-dismiss delay in ms

`sendMail`

Sends an email to a claimed in-game address. The recipient must have claimed that address in the Mail app.

local ok = exports['amzn_smartphone']:sendMail(
    'johndoe@celltowa.com',   -- recipient address
    'Order Confirmation',     -- subject
    'Your order has shipped.',-- body
    'shop@celltowa.com'       -- optional sender address (defaults to noreply@<suffix>)
)

Returns: true if the mail was sent, false if the address does not exist or input was invalid.


`sendMailToSource`

Sends an email to whichever address the target player has claimed.

local ok = exports['amzn_smartphone']:sendMailToSource(
    targetSource,             -- player server ID
    'Paycheck',
    'You received $500.',
    'employer@celltowa.com'   -- optional sender address
)

Returns: true on success, false if the player has no mail address or input was invalid.


Admin permissions

Chat commands

/resetphonepasscode and /resetphonedata require ACE permission admin (Config.Admin.Ace). See Configuration — Admin commands for ACL setup.

Server exports

Admin exports (resetPasscode, resetPhoneData, getPhoneIdentity, getIdentifierByPhoneNumber, deleteTweederPost, deleteCloutgramPost) do not check ACE permissions themselves. Call them only from server resources that already verify staff access (for example an admin menu or custom staff script).


`resetPasscode`

Clears a player's phone passcode by character identifier. Typically used from an admin menu or staff script.

exports['amzn_smartphone']:resetPasscode(citizenid)

If the player is online, their client is notified immediately and the lock screen updates.


`resetPhoneData`

Wipes all personal phone data for a character and assigns a new phone number.

exports['amzn_smartphone']:resetPhoneData(citizenid)

This resets contacts, messages, settings, notes, calendar, photos metadata, installed apps, Tweeder profile, mail address, passcode, alarms, and map pins. If the player is online, their client reloads fresh phone data.


`getPhoneIdentity`

Looks up a character's phone number, mail address, and social handles by character identifier.

local identity = exports['amzn_smartphone']:getPhoneIdentity(citizenid)

Returns: a table, or nil if the character has no phone row.

Field Type Description
identifier string Character identifier (same as input)
phoneId number Stable internal phone row id
phoneNumber string Current phone number
mailAddress string | nil Claimed mail address
tweederUsername string | nil Tweeder handle
tweederDisplayName string | nil Tweeder display name
cloutgramUsername string | nil Cloutgram handle
cloutgramDisplayName string | nil Cloutgram display name

`getIdentifierByPhoneNumber`

Looks up a character identifier from a phone number. Non-digit characters are stripped before lookup.

local citizenid = exports['amzn_smartphone']:getIdentifierByPhoneNumber('5551234567')

Returns: character identifier string, or nil if no row matches.


`deleteTweederPost`

Soft-deletes a Tweeder post by database id. Works when the author is offline.

local ok = exports['amzn_smartphone']:deleteTweederPost(postId)

Returns: true if the post was deleted, false if the id is invalid or the post was not found.

Online clients receive the same feed update as an in-game delete. Respects Tweeder block lists when broadcasting.


`deleteCloutgramPost`

Soft-deletes a Cloutgram post by database id. Works when the author is offline.

local ok = exports['amzn_smartphone']:deleteCloutgramPost(postId)

Returns: true if the post was deleted, false if the id is invalid or the post was not found.

Online clients receive the same feed update as an in-game delete. Respects Cloutgram block lists when broadcasting.


Moderation workflow

Social app reports (Tweeder, Cloutgram, Hagglr, Snitch) are stored in the database and forwarded to Config.Logs (Discord and/or FiveManage). Staff review those reports in Discord, FiveManage, or an admin menu, then action them with the delete exports above.


Client export

`notify`

Sends a notification to the local player's phone. Respects airplane mode.

exports['amzn_smartphone']:notify({
    app       = 'My App',
    icon      = 'fa-star',
    iconColor = '#ff9f0a',
    title     = 'Local Event',
    body      = 'This came from a client script.',
    timeout   = 5000,
})

Use the server export when notifying other players. Use this export only from client scripts for the local player.


Events

Other resources can also trigger a notification on a client via net event:

-- server → client
TriggerClientEvent('phone:notification', targetSource, {
    title = 'Alert',
    body  = 'From another resource.',
})

The client-side Phone.Notify helper applies the same defaults as the export.


Example - job payout notification

RegisterNetEvent('myjob:server:paid', function(amount)
    local src = source
    exports['amzn_smartphone']:notify(src, {
        app       = 'Bank',
        icon      = 'fa-building-columns',
        iconColor = '#30d158',
        title     = 'Paycheck Received',
        body      = ('$%s deposited to your account.'):format(amount),
    })
end)

Example - send mail from a MDT

RegisterNetEvent('mdt:server:sendCitation', function(targetSource, fineText)
    exports['amzn_smartphone']:sendMailToSource(
        targetSource,
        'Citation Issued',
        fineText,
        'police@celltowa.com'
    )
end)

Example - admin reset

-- character identifier (citizenid on QBCore/QBX)
exports['amzn_smartphone']:resetPhoneData(citizenid)

Example - admin lookup

local identity = exports['amzn_smartphone']:getPhoneIdentity(citizenid)
if identity then
    print(identity.phoneNumber, identity.mailAddress, identity.tweederUsername)
end

local owner = exports['amzn_smartphone']:getIdentifierByPhoneNumber('5551234567')

Example - moderate social post

exports['amzn_smartphone']:deleteTweederPost(42)
exports['amzn_smartphone']:deleteCloutgramPost(99)
919DESIGN 919DESIGN

© 2026 919DESIGN. Premium FiveM Server Management Resources.

This website and its checkout process is owned & operated by Tebex Limited, who handle product fulfilment, billing support and refunds.