Skip to content

Commit ca9d784

Browse files
Fix ReferenceError: import Octokit on GHES in REST scripting guide
1 parent 6dd875c commit ca9d784

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎content/rest/guides/scripting-with-the-rest-api-and-javascript.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ If you want to use the API on behalf of an organization or another user, {% data
5656
Instead of importing `Octokit` from `octokit`, import `App`. In the following example, replace `APP_ID` with a reference to your app's ID. Replace `PRIVATE_KEY` with a reference to your app's private key. Replace `INSTALLATION_ID` with the ID of the installation of your app that you want to authenticate on behalf of. You can find your app's ID and generate a private key on the settings page for your app. For more information, see [AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/managing-private-keys-for-github-apps). You can get an installation ID with the `GET /users/{username}/installation`, `GET /repos/{owner}/{repo}/installation`, or `GET /orgs/{org}/installation` endpoints. For more information, see [AUTOTITLE](/rest/apps/apps).{% ifversion ghes %} Replace `HOSTNAME` with the name of {% data variables.location.product_location %}.{% endif %}
5757

5858
```javascript copy
59-
import { App } from "octokit";
59+
import { App{% ifversion ghes %}, Octokit{% endif %} } from "octokit";
6060

6161
const app = new App({
6262
appId: APP_ID,

0 commit comments

Comments
 (0)