Not sure if you should be building with the Embedded App SDK? Read through Choosing an SDK to understand your options when integrating Rich Presence with your app.
Understanding Rich Presence Data
Default Rich Presence Data
By default, when a user is connected to your Activity, the app’s icon will appear on their profile. If the user viewing the profile has the ability to join, an “Ask to Join” button will be displayed as well.
Custom Rich Presence Data
Now let’s see what custom presence data can look like when a user joins your Activity. The types for these fields and examples are in the sections below, but for now let’s just get an idea of what we’re working with:
- large_imageand- small_imageare both in the- assetsobject, which you can see below in the table below. They’re labeled with the object’s keys to make it more clear how they appear in a Discord profile.
- You can’t set App Name when setting presence—it’s always the name configured in your app’s settings.
- The state (1 of max_party)badge will only render when a party field is provided. Otherwise, state will be shown in a line of text below details.
Updating Presence
When updating Rich Presence data using the Embedded App SDK, the only real command you need to use issetActivity(). Under the hood, setActivity() calls the RPC SET_ACTIVITY command with the features and fields available when you’re building an Activity.
Why am I seeing the word activity everywhere?
A brief platform history lesson about what all these different activites are about
Why am I seeing the word activity everywhere?
A brief platform history lesson about what all these different activites are about
As you start exploring the Rich Presence docs, you’ll start seeing the word “activity” a lot. The “activities” referenced in docs (like the RPC ones) aren’t related to the Activities you’re building with the Embedded App SDK.When Rich Presence was introduced, the underlying object that contains presence data was called an “activity” (long before the Embedded App SDK), which is what the RPC 
SET_ACTIVITY command is referencing. And that’s also why the Embedded App SDK’s wrapper around the RPC command is called setActivity() yet isn’t really related to setting the state for the kind of Activity that you’re building.We know, it’s confusing ¯\_(⊙︿⊙)_/¯ — the naming was logical at the time because it was really about the user’s activity in a 3rd party game or service, but now it sorta feels like activity-ception. Understanding the nuances here aren’t super important, and it’s why we have guides like this one. But as they say…the more you (at least sort of) know.rpc.activities.write Scope
To display custom Rich Presence data for a user, your app will need to be authorized with therpc.activities.write scope for that user.
To request the scope, your authorize() call might look something like this:
Example requesting rpc.activities.write with authorize()
Example requesting rpc.activities.write with authorize()
setActivity Fields
When callingsetActivity(), you are expected to pass a partial activity object.
Below is a table with many of the available fields for the activity partial. Some were left out since they don’t have an effect for Activities.
Activity partial object
All of the fields on the partial object are optional and nullable
| field | type | description | 
|---|---|---|
| type | integer | Activity type, which determines the header text for the Rich Presence data | 
| state | string | User’s current party status | 
| details | string | What the player is currently doing in your Activity | 
| timestamps | timestamps object | Unix timestamps to display start and/or end times | 
| assets | assets object | Images used for the Rich Presence data (and their hover texts) | 
| party | party object | Information for the current party of the player | 
setActivity Example
Now let’s take a look at more of a real example. Take a look at the Rich Presence data below that is for an Activity:
setActivity() code would look like:
Example calling setActivity() command
Example calling setActivity() command
The following example only focuses on using 
setActivity(). Follow the Building an Activity guide for more details on topics like instantiating the Embedded App SDK and authenticating users.Using External Custom Assets
Typically when building an Activity, you need to be aware of the proxy and how to use external resources. However, lucikly for you (and the writer of this guide), image URLs in fields for features like Rich Presence don’t need to jump through any extra hoops. As mentioned in the Rich Presence overview, you have more than 300 custom assets or if you want to use your stored images from somewhere else, you can specify an external URL forlarge_image or small_image within the assets object.
Example setting presence with an external asset
Example setting presence with an external asset
The following example only focuses on using 
setActivity(). Follow the Building an Activity guide for more details on topics like instantiating the Embedded App SDK and authenticating users.