Introducing the Share Link API: Deep Link Players Directly Into the Action

Share Link API lets you create custom links to drive targeted re-engagement.


Hi Creators,

At RDC, we announced Roblox Moments and our vision for a new era of user-generated content on the platform. We shared how we built the Moments experience using the same tools we’re giving to you, including a new suite of APIs for in-experience content creation, sharing, and discovery. Since launch, we’re already seeing Moments help users discover new experiences across different genres, and in turn help you reach new audiences.

Today, we’re excited to introduce the Share Link API (SocialService:PromptLinkSharing), which lets you programmatically create short, customizable links that can be used to drive targeted re-engagement and deep linking for your experiences. Whether players are sharing the link off-platform or you’re using it to power a custom in-experience sharing flow, think of it as a custom entry point designed to give players a seamless and context-rich way to join the action in your experience.

Why Use PromptLinkSharing?

This API unlocks a new way to attract new players and retaining fans by allowing you to create custom links for your experiences.

  • Deep Link to the Gameplay Action: Send players directly to a specific obby level, a sports match, or a fashion runway by including LaunchData in the link.
  • Customize Link Previews: Control the title and description of your share link previews to make them more enticing and reflective of your experience.
  • Encourage Re-engagement: Use these links to promote in-experience events or encourage players to invite people they know, with the option for the link to expire and redirect to a fallback destination.

How It Works

The Share Link API performs two key actions: creating the link and opening the sharing menu. When someone clicks the link, they are immediately directed to the correct location or given a reward in your experience, based on the LaunchData you provide. If the generated link has expired, players who click it are seamlessly redirected to a fallback link you define.

The generic SocialService:OpenShareSheet can then be reserved for other ShareInputType use cases, like sharing captured video or screenshots, at a later time. For the initial launch we will restrict the call of this function to RCC, and RCC will send a signal to the target client to prompt open the share sheet with the generated link. The return will be PromptLinkSharingResult Enum.

Technical Details

For complete documentation and a full list of options, see the PromptLinkSharing Documentation.

The new API is part of SocialService.

Click here to view the API
local SocialService = game:GetService("SocialService")
local Players = game:GetService("Players")

type LinkSharingOptions = {
    FallbackLinkId: string?, -- if this does not exist, the sharelink will default to experience join link
    ExpirationSeconds: number?, -- optional, truncate to nearest integer, defaults to 86400
    PreviewTitle: string?, 
    PreviewDescription: string?,
    PreviewAssetId: number?, -- rendering the asset as preview will be supported in the future.
    LaunchData: string?
}

local player = Players.LocalPlayer
local linkSharingOptions: LinkSharingOptions = {} -- Any options from the type can be added here.

local success, result: Enum.PromptLinkSharingResult  = pcall(function()
	return SocialService:PromptLinkSharing(player, linkSharingOptions)
end)

Code Example: Create a Customizable Share Link

Here is a full example of how you can create a link with custom preview metadata, a fallback link, and deep-link data.

Click here to view an example
local HttpService = game:GetService("HttpService")
local SocialService = game:GetService("SocialService")

local success, result  = pcall(function()
	local data = {
		promoCode = "j7du67"
	}

	local launchData = HttpService:JSONEncode(data)

	local LinkSharingOptions = {
		ExpirationSeconds = 20000,
		PreviewTitle = "Awesome Game",
		PreviewDescription = "Lets play together",
		LaunchData = launchData,
	}

	return SocialService:PromptLinkSharing(player, LinkSharingOptions)
end)

if not success or result ~= Enum.PromptLinkSharingResult.Success then
	warn("PromptLinkSharing failed:", tostring(result))
end

On join, retrieve your data via:

local joinData = player:GetJoinData()
local launchData = joinData and joinData.LaunchData

Amplify Your Moments and Drive Discovery

The launch of the Share Link API is an important step toward making your experiences more social and discoverable. By implementing it, you’re enabling players to help share and grow your game.

We encourage you to integrate the following APIs today:

  • Video Captures API: This API allows you to programmatically trigger a video recording during key in-game moments, like a high score, a rare event, or a perfect trick. By capturing the peak of the action, you create high-quality, shareable content that drives discovery.
  • Share Link API: This API ensures that when a player shares that awesome captured video, the link they send immediately takes new users directly back into your experience.

This is just the beginning. We’re building a complete ecosystem for dynamic content creation and discovery. As we shared at RDC, the following set of APIs are coming soon:

  • Upload API: Enables users to publish and share their captured content within your experience.
  • Recommendations API: This API will allow you to build custom content showcases inside your own experience, surfacing trending moments and driving engagement.
  • Moments Source Code: We will be releasing the source code for the Moments experience, giving you the ability to customize the entire content-sharing workflow for your experience.

We can’t wait to see the creative ways you use these APIs to grow your audience. Start experimenting with the Video Captures API and Share Link API now, and share your feedback and ideas below!

Thank you,
@corepcgamer, Moments Product Lead, Roblox User Team

103 Likes

This topic was automatically opened after 10 minutes.

we got roblox tiktok before gta 6 :wilted_flower:

32 Likes

It’s a good feature, but I doubt people would use this & it would be of use.

8 Likes

Sounds like a good feature on paper, but I have a feeling this is going to be abused

14 Likes


pretty cool update
it’s like sponsors but roblox games with rewards, pretty neat!

5 Likes

Yay! The new cool update look amazing! I can’t wait to play Roblox Moments later!!!

4 Likes

Thhaaaaaaaaaaaats pretty nice ngl

2 Likes

Is there anyone stopping a developer from making the entire screen be a share link with no way to close it or avoid sharing?

1 Like

Love that we can get short share links now, but maybe revise this example, it misleads towards bad practice, join data is not secure and you shouldn’t pass anything sensitive like reward amount through join data. It should instead be a key that is stored in the player’s file which is used to reward them a serverside defined amount only once per some period of time.

20 Likes

There should be a cooldown type thing for this. Like you can only activate the share link 3 times per 30 seconds so you can play the game a little bit.

2 Likes

Can’t wait for those scam games to say you get access to the game after sharing it with 10 friends.

3 Likes

I have no friends… whatever that word means. I have 0 connections though :+1:

4 Likes

Oh yeah sorry I meant to say

Can’t wait for those scam experiences to say you get access to the experience after sharing it with 10 connections.

3 Likes

My experiences are a bit more greedy as I request 50 connections before you can play my experience. Your right to play my experience is taken away after 5 minutes. Meaning you must invite 50 connections per 5 minutes.

2 Likes

Hello. This code is invalid, and will not work in Luau. Most likely due to a mistake when transferring from C++ to Luau.

This should be correct:

type LinkSharingOptions = {
    FallbackLinkId: string?, -- if this does not exist, the sharelink will default to experience join link
    ExpirationSeconds: number?, -- optional, truncate to nearest integer, defaults to 86400
    PreviewTitle: string?, 
    PreviewDescription: string?,
    PreviewAssetId: number?, -- rendering the asset as preview will be supported in the future.
    LaunchData: string?
}

local SocialService = game:GetService("SocialService")
local Players = game:GetService("Players")

local Player = Players.LocalPlayer
local LinkSharingOptions: LinkSharingOptions = {} -- Any options from the type can be added here.

local Result: Enum.PromptLinkSharingResult = SocialService:PromptLinkSharingAsync(Player, LinkSharingOptions)
3 Likes

Is there a way to make it never expire? Is there an upper limit where we couldn’t just set an insanely high number?

The staff got tired of Roblox and started typing in a different language lol. Your post is correct and valid :+1:

3 Likes

even roblox wants enums in roblox :pensive:

4 Likes

That’s just the API. It’s not meant to run in luau. The luau example is right below that