BaseContext
@devvit/public-api v0.13.10-dev
Type Alias: BaseContext
BaseContext =
object
Properties
appAccountId
appAccountId:
string
The ID of the current app's account
Deprecated
Use BaseContext.appSlug instead to get the app's username
appName
appName:
string
The slug of the app that is running
Deprecated
Use BaseContext.appSlug instead.
appSlug
appSlug:
string
The slug of the app that is running
appVersion
appVersion:
string
The version of the app that is running
commentId?
optionalcommentId:string
The ID of the current comment
debug
debug:
ContextDebugInfo
More useful things, but probably not for the average developer
loid?
optionalloid:string
Experimental
LOID (logged-out ID) is a token assigned on first visit and persists across sessions, account creation, and sign-in. Logged-in users retain a LOID for attribution, analytics, and cross-session tracking.
metadata
metadata:
Metadata
Request headers.
postData
postData:
PostData|undefined
postId?
optionalpostId:string
The ID of the current post
snoovatar?
optionalsnoovatar:string
Experimental
The current user's snoovtar URL if logged in
subredditId
subredditId:
string
The ID of the current subreddit
subredditName?
optionalsubredditName:string
The name of the current subreddit
userId?
optionaluserId:string
The current user's ID if this event was triggered by a logged in user
username?
optionalusername:string
Experimental
The current user's handle if logged in
Methods
toJSON()
toJSON():
Omit<BaseContext,"toJSON">
Returns a JSON representation of the context
Returns
Omit<BaseContext, "toJSON">