Skip to main content
This function and all other functions in this graphql sdk are deprecated. Please migrate to the new rest api.
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 type of end-user an app is built for
	appType:
		"b2b_app" /* Valid values: b2b_app | b2c_app | company_app | component */,

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

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

	// 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",

	// 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 name of the app
	name: "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;