feat: support chatgpt web access token import

This commit is contained in:
Codex
2026-05-06 14:45:39 +08:00
parent 94a6f315ca
commit 7eaf3e7d03
11 changed files with 511 additions and 52 deletions

View File

@@ -101,7 +101,19 @@ export async function completeProviderLevelOAuth(
export async function importProviderRefreshToken(
providerId: string,
data: { refresh_token?: string; access_token?: string; name?: string; proxy_node_id?: string }
data: {
refresh_token?: string
access_token?: string
expires_at?: number
name?: string
proxy_node_id?: string
email?: string
account_id?: string
account_user_id?: string
plan_type?: string
user_id?: string
account_name?: string
}
): Promise<ProviderOAuthCompleteResponseWithKey> {
const resp = await client.post(`/api/admin/provider-oauth/providers/${providerId}/import-refresh-token`, data)
return resp.data