xqdoo00o / ChatGPT-to-API

Scalable unofficial ChatGPT API for production.
648 stars 129 forks source link

大佬,希望增加rt刷新at #43

Closed gkingt closed 4 months ago

gkingt commented 4 months ago

希望增加rt刷新at,以下是python示例


url = "https://auth0.openai.com/oauth/token"
headers = {"Content-Type": "application/json"}
data = {
    "redirect_uri": "com.openai.chat://auth0.openai.com/ios/com.openai.chat/callback",
    "grant_type": "refresh_token",
    "client_id": "pdlLIX2Y72MIl2rhLhTE9VV9bN905kBh",
    "refresh_token": "替换成你的refresh_token"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json()["access_token"])
xqdoo00o commented 4 months ago

这个refresh_token是ios专有的?没有ios设备没法测试。直接用__Secure-next-auth.session-token不好嘛

gkingt commented 4 months ago

好的吧

xqdoo00o commented 4 months ago

目前是三个月,不过每天都会刷新的,即每天都会往后延长三个月