Complete plugin OAuth flow
POST
/api/v1/plugin-system/oauth/callback
const url = 'https://example.com/api/v1/plugin-system/oauth/callback';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"instanceId":"example","code":"example","state":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/plugin-system/oauth/callback \ --header 'Content-Type: application/json' \ --data '{ "instanceId": "example", "code": "example", "state": "example" }'Exchanges an OAuth authorization code and stores the resulting plugin credentials.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
instanceId
required
string
code
required
string
state
required
string
Examplegenerated
{ "instanceId": "example", "code": "example", "state": "example"}Responses
Section titled “Responses”OAuth callback handled
Media typeapplication/json
object
ok
boolean
Examplegenerated
{ "ok": true}Bad Request
Unauthorized
Internal Server Error