用户授权页
line1
line1
GET
https://next.ohmygpt.com/next/v1/oauth
redirect_uri
中https://next.aigptx.top/next/v1/oauth?response_type=code&client_id=6681463833ebdbb2566d1def&redirect_uri=https://next.aigptx.top/next/v1/oauth/succeed&scope=general_api_access&state=EXAMPLE_STATE
https://next.aigptx.top/next/v1/oauth?response_type=code&client_id=6681463833ebdbb2566d1def&redirect_uri=https://wiki.getletbot.com/api/authorize&scope=general_api_access&state=EXAMPLE_STATE
https://wiki.getletbot.com/api/authorize?code=rA6HSC0xLXbV1lJj&state=EXAMPLE_STATE
1.
code
等参数以进一步完成OAuth授权流程2.
/next/v1/oauth/succeed
中,此页面可展示Code,并提示用户在您的应用中输入此Code可自定义一个模板,从而实现更大自由度的跳转URL参数实现:
例如:
?code={code}&state={state}&tgid=114514
转换为base64为:
P2NvZGU9e2NvZGV9JnN0YXRlPXtzdGF0ZX0mdGdpZD0xMTQ1MTQ=
{code}
和{state}
为对应的参数,然后直接在前面拼接上redirect_uri执行跳转请求参数
Query 参数
response_type
string
必需
示例值:
code
client_id
string
必需
示例值:
6681463833ebdbb2566d1def
redirect_uri
string
必需
示例值:
https://wiki.getletbot.com/api/authorize
scope
string
必需
示例值:
general_api_access
state
string
可选
示例值:
EXAMPLE_STATE
redirect_template
string
可选
示例值:
P2NvZGU9e2NvZGV9JnN0YXRlPXtzdGF0ZX0mdGdpZD0xMTQ1MTQ=
示例代码
返回响应
修改于 2024-09-07 08:18:14