Skip to content

Document Datadog Apps OAuth support#37653

Open
sdkennedy2 wants to merge 5 commits into
masterfrom
sdkennedy2/datadog-apps-oauth-docs
Open

Document Datadog Apps OAuth support#37653
sdkennedy2 wants to merge 5 commits into
masterfrom
sdkennedy2/datadog-apps-oauth-docs

Conversation

@sdkennedy2

@sdkennedy2 sdkennedy2 commented Jun 22, 2026

Copy link
Copy Markdown

What does this PR do? What is the motivation?

Documents OAuth support for Datadog Apps local development and uploads.

The Datadog Apps scaffold uses OAuth by default for npm run dev and npm run upload when API and application keys are not configured. This update removes the requirement to create API and application keys before trying the local development flow.

Merge readiness

  • Ready for merge

AI assistance

Used Codex to draft the documentation update and check the README and contribution guidelines. The changes were reviewed against the repository style guidance before opening the draft PR.

Additional notes

Validation performed locally:

  • git diff --check

vale is not installed in this local shell, so I could not run the style linter before opening this draft.

No DOCS ticket key is available for the PR title yet.

@sdkennedy2

Copy link
Copy Markdown
Author

@codex review
@cursor review

@github-actions

Copy link
Copy Markdown
Contributor

Preview links (active after the build_preview check completes)

Modified Files

@sdkennedy2 sdkennedy2 marked this pull request as ready for review June 22, 2026 16:52
@sdkennedy2 sdkennedy2 requested a review from a team as a code owner June 22, 2026 16:52
@estherk15 estherk15 self-assigned this Jun 22, 2026
Comment thread content/en/actions/datadog_apps.md Outdated
```
2. Open the URL shown in the terminal (for example, `http://localhost:5173/`) to preview your app.

When the dev server needs to call Datadog, such as when running a backend function locally, it uses OAuth by default. If authorization is required, the command opens a browser prompt. After authorization completes, the token is cached in your operating system credential store when supported.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth mentioning if it's not supported?

Suggested change
When the dev server needs to call Datadog, such as when running a backend function locally, it uses OAuth by default. If authorization is required, the command opens a browser prompt. After authorization completes, the token is cached in your operating system credential store when supported.
When the dev server needs to call Datadog, such as when running a backend function locally, it uses OAuth by default. If authorization is required, the command opens a browser prompt. After authorization completes, the token is cached in your operating system credential store.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Its a bit nuanced when it isn't supported. Essentially the scaffolding command we provide will set them up properly so it will work with their operating system credential store, but if they choose to integrate the Datadog Apps build plugin we provide. They will need to make sure they install the optional plugin @napi-rs/keyring, but I feel like this is too in the weeds. Since the docs reference using the scaffolding command we can just leave out the part about "when supported". I'll make the change.

Comment thread content/en/actions/datadog_apps.md Outdated

To automatically upload your app on every push to the `main` branch, use the [`DataDog/apps-github-action`][11] GitHub Action. This action builds your app and uploads it to Datadog.

CI/CD uploads should use API and application key authentication. Create a Datadog API key and an application key with [Actions API Access][5] enabled, then store them as GitHub secrets.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a requirement or a suggestion/recommendation? If it's "should" can you add what the exception would be?

Suggested change
CI/CD uploads should use API and application key authentication. Create a Datadog API key and an application key with [Actions API Access][5] enabled, then store them as GitHub secrets.
CI/CD uploads require API and application key authentication. Create a Datadog API key and an application key with [Actions API Access][5] enabled, then store them as GitHub secrets.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. I'll make the change.

Comment thread content/en/actions/datadog_apps.md Outdated
node --version
```
- A Datadog **API key** and an **application key** with [Actions API Access][5] enabled. For instructions on creating keys, see [API and Application Keys][6].
- For local development and uploads, the generated app uses Datadog OAuth by default. The first command that needs Datadog access opens a browser authorization flow and caches the OAuth token for later use.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend moving this bullet point since it's not necessarily a prereq. I moved it to the "Develop your app locally" section, but let me know if you think it belongs somewhere else.

Suggested change
- For local development and uploads, the generated app uses Datadog OAuth by default. The first command that needs Datadog access opens a browser authorization flow and caches the OAuth token for later use.

@sdkennedy2 sdkennedy2 Jun 22, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a good callout. This bullet doesn't really feel like a prerequisites. I don't think this line should appear here. My only concern about moving it to Develop your app locally is that the Oauth information is relevent to both local developement and also uploading your app. Its probably good enough though. I'll make the change.


2. Start the development server:

1. Start the development server:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Start the development server:
**Note**: For local development and uploads, the generated app uses Datadog OAuth by default. The first command that needs Datadog access opens a browser authorization flow and caches the OAuth token for later use.
1. Start the development server:

Comment thread content/en/actions/datadog_apps.md Outdated
```
- A Datadog **API key** and an **application key** with [Actions API Access][5] enabled. For instructions on creating keys, see [API and Application Keys][6].
- For local development and uploads, the generated app uses Datadog OAuth by default. The first command that needs Datadog access opens a browser authorization flow and caches the OAuth token for later use.
- Optional: A Datadog **API key** and an **application key** with [Actions API Access][5] enabled. If both `DD_API_KEY` and `DD_APP_KEY` are set, the generated app uses API and application key authentication instead of OAuth. API and application keys are also required for API-key-backed build telemetry, such as build metrics and Error Tracking sourcemap uploads. For instructions, see [API and Application Keys][6].

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion removing details about the override since it's mentioned in the body.

Suggested change
- Optional: A Datadog **API key** and an **application key** with [Actions API Access][5] enabled. If both `DD_API_KEY` and `DD_APP_KEY` are set, the generated app uses API and application key authentication instead of OAuth. API and application keys are also required for API-key-backed build telemetry, such as build metrics and Error Tracking sourcemap uploads. For instructions, see [API and Application Keys][6].
- Optional: A Datadog **API key** and an **application key** with [Actions API Access][5] enabled. Required for API-key-backed build telemetry (build metrics and Error Tracking sourcemap uploads) and for CI/CD uploads. For instructions, see [API and Application Keys][6].

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I'll make the change 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants