Approve or deny a connection
const url = 'http://127.0.0.1:8080/api/v1/account/authorization';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"access":"read","code":"example","deny":true,"library_id":"example","remember":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:8080/api/v1/account/authorization \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "access": "read", "code": "example", "deny": true, "library_id": "example", "remember": true }'Requires browser sign-in within five minutes and CSRF. Access is limited to the selected library and read/write choice. Remember permits rotating refresh credentials until the instance policy’s expiry. The browser never receives access or refresh tokens. Uses the persisted local-mode user when authentication is disabled. Otherwise an authenticated browser session is required, except for the current account and sign-in. Modifying authenticated requests require the current X-CSRF-Token. Credentials and responses must not be cached.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Required with an authenticated browser session; read from current-account.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”Operation completed.
object
Example generated
{ "redirect_uri": "example"}No valid session or API token (authentication-required), or the credential sent is invalid (invalid-credentials).
object
Example generated
{ "code": "example", "detail": "example", "status": 1, "title": "example", "type": "example"}default
Section titled “default”Stable account problem code; authentication, authority, validation or lifecycle conflict.
object
Example generated
{ "code": "example", "detail": "example", "status": 1, "title": "example", "type": "example"}