This operation is only available on the server.

Required Permissions

  • developer:update_app

Usage

import { whopSdk } from "@/lib/whop-sdk";

const result = await whopSdk.apps.updateApp({
	// The description of the app for the app store in-depth app view.
	appStoreDescription: "some string",

	// The base developer url of the app
	baseDevUrl: "some string",

	// The base preview url of the app
	basePreviewUrl: "some string",

	// The base production url of the app
	baseUrl: "some string",

	// The path for the dashboard view of the app
	dashboardPath: "some string",

	// The default agent user ID for the app
	defaultAgentUserId: "xxxxxxxxxxx",

	// The description of the app
	description: "some string",

	// The path for the discover view of the app
	discoverPath: "some string",

	// The path for the hub view of the app
	experiencePath: "some string",

	// If the apps experience's should force showing the pre-checkout iframe, and not rely on app connections.
	forceCheckoutIframe: true,

	// The hub call to action text of the app
	hubCta: "some string",

	// The icon for the app
	icon: {
		// This ID should be used the first time you upload an attachment. It is the ID
		// of the direct upload that was created when uploading the file to S3 via the
		// mediaDirectUpload mutation.
		directUploadId: "xxxxxxxxxxx",

		// The ID of an existing attachment object. Use this when updating a resource and
		// keeping a subset of the attachments. Don't use this unless you know what you're doing.
		id: "xxxxxxxxxxx",
	},

	// The ID of the app
	id: "xxxxxxxxxxx" /* Required! */,

	// The image for the app
	image: "some string",

	// The name of the app
	name: "some string",

	// The product page text of the app
	productPage: "some string",

	// The scopes that the app will request off of users when a user installs the app.
	requiredScopes: ["read_user" /* Valid values: read_user */],

	// If the status is live, the app is visible on Whop discovery. In order to be
	// live, you need to set the name, icon, and description. Being unlisted or
	// hidden means it's not visible on Whop but you can still install the app via
	// direct link. To remove the app from whop discovery, you should set the status to unlisted.
	status: "hidden" /* Valid values: hidden | live | unlisted */,
});

Example output

const result = true;