-
Notifications
You must be signed in to change notification settings - Fork 186
Description
The Apps SDK docs say:
If you already run an API or need multi-user collaboration, integrate with your existing storage layer. In this model:
Authenticate the user via OAuth (see Authentication) so you can map ChatGPT identities to your internal accounts.
Use your backend’s APIs to fetch and mutate data. Keep latency low; users expect components to render in a few hundred milliseconds.
This repo has an example of facilitating the OAuth dance, but, no examples of making authenticated API calls within a widget to the backend. What's the recommended pattern for authenticating those calls made from within the iframe? I know that MCP tool calls can be made with window.openai
, but the docs seem to suggest we can also make plain old HTTP API calls within the client side JS -- how should we auth those?
Thanks!