2552 lines
75 KiB
HTML

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="https://communitysolidserver.github.io/CommunitySolidServer/7.x/usage/account/json-api/">
<link rel="prev" href="../../identity-provider/">
<link rel="next" href="../login-method/">
<link rel="icon" href="../../../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.6.0, mkdocs-material-9.5.31">
<title>JSON API - Community Solid Server</title>
<link rel="stylesheet" href="../../../assets/stylesheets/main.3cba04c6.min.css">
<link rel="stylesheet" href="../../../assets/stylesheets/palette.06af60db.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
<script>__md_scope=new URL("../../..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
</head>
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="deep-purple" data-md-color-accent="deep-orange">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#account-management-json-api" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<div data-md-color-scheme="default" data-md-component="outdated" hidden>
<aside class="md-banner md-banner--warning">
<div class="md-banner__inner md-grid md-typeset">
You're not viewing the latest version.
<a href="../../../..">
<strong>Click here to go to latest.</strong>
</a>
</div>
<script>var el=document.querySelector("[data-md-component=outdated]"),outdated=__md_get("__outdated",sessionStorage);!0===outdated&&el&&(el.hidden=!1)</script>
</aside>
</div>
<header class="md-header" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../../.." title="Community Solid Server" class="md-header__button md-logo" aria-label="Community Solid Server" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54Z"/></svg>
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
Community Solid Server
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
JSON API
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="deep-purple" data-md-color-accent="deep-orange" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_0">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m17.75 4.09-2.53 1.94.91 3.06-2.63-1.81-2.63 1.81.91-3.06-2.53-1.94L12.44 4l1.06-3 1.06 3 3.19.09m3.5 6.91-1.64 1.25.59 1.98-1.7-1.17-1.7 1.17.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95 2.06.05m-2.28 4.95c.83-.08 1.72 1.1 1.19 1.85-.32.45-.66.87-1.08 1.27C15.17 23 8.84 23 4.94 19.07c-3.91-3.9-3.91-10.24 0-14.14.4-.4.82-.76 1.27-1.08.75-.53 1.93.36 1.85 1.19-.27 2.86.69 5.83 2.89 8.02a9.96 9.96 0 0 0 8.02 2.89m-1.64 2.02a12.08 12.08 0 0 1-7.8-3.47c-2.17-2.19-3.33-5-3.49-7.82-2.81 3.14-2.7 7.96.31 10.98 3.02 3.01 7.84 3.12 10.98.31Z"/></svg>
</label>
<input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="deep-purple" data-md-color-accent="deep-orange" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_0" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3m0-7 2.39 3.42C13.65 5.15 12.84 5 12 5c-.84 0-1.65.15-2.39.42L12 2M3.34 7l4.16-.35A7.2 7.2 0 0 0 5.94 8.5c-.44.74-.69 1.5-.83 2.29L3.34 7m.02 10 1.76-3.77a7.131 7.131 0 0 0 2.38 4.14L3.36 17M20.65 7l-1.77 3.79a7.023 7.023 0 0 0-2.38-4.15l4.15.36m-.01 10-4.14.36c.59-.51 1.12-1.14 1.54-1.86.42-.73.69-1.5.83-2.29L20.64 17M12 22l-2.41-3.44c.74.27 1.55.44 2.41.44.82 0 1.63-.17 2.37-.44L12 22Z"/></svg>
</label>
</form>
<script>var media,input,key,value,palette=__md_get("__palette");if(palette&&palette.color){"(prefers-color-scheme)"===palette.color.media&&(media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']"),palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent"));for([key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"/></svg>
</button>
</nav>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://github.com/CommunitySolidServer/CommunitySolidServer" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
</div>
<div class="md-source__repository">
CommunitySolidServer
</div>
</a>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
<div class="md-grid">
<ul class="md-tabs__list">
<li class="md-tabs__item">
<a href="../../.." class="md-tabs__link">
Welcome
</a>
</li>
<li class="md-tabs__item">
<a href="../../../features/" class="md-tabs__link">
Features
</a>
</li>
<li class="md-tabs__item md-tabs__item--active">
<a href="../../starting-server/" class="md-tabs__link">
Usage
</a>
</li>
<li class="md-tabs__item">
<a href="../../../architecture/overview/" class="md-tabs__link">
Architecture
</a>
</li>
<li class="md-tabs__item">
<a href="../../../contributing/making-changes/" class="md-tabs__link">
Contributing
</a>
</li>
<li class="md-tabs__item">
<a href="../../../docs/" target="_blank" class="md-tabs__link">
API
</a>
</li>
</ul>
</div>
</nav>
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="../../.." title="Community Solid Server" class="md-nav__button md-logo" aria-label="Community Solid Server" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54Z"/></svg>
</a>
Community Solid Server
</label>
<div class="md-nav__source">
<a href="https://github.com/CommunitySolidServer/CommunitySolidServer" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
</div>
<div class="md-source__repository">
CommunitySolidServer
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_1" >
<div class="md-nav__link md-nav__container">
<a href="../../.." class="md-nav__link ">
<span class="md-ellipsis">
Welcome
</span>
</a>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_1_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_1">
<span class="md-nav__icon md-icon"></span>
Welcome
</label>
<ul class="md-nav__list" data-md-scrollfix>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" >
<label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0">
<span class="md-ellipsis">
Features
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_2">
<span class="md-nav__icon md-icon"></span>
Features
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../features/" class="md-nav__link">
<span class="md-ellipsis">
Overview
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../features/test/" class="md-nav__link">
<span class="md-ellipsis">
Tests
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" checked>
<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
<span class="md-ellipsis">
Usage
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_3">
<span class="md-nav__icon md-icon"></span>
Usage
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../starting-server/" class="md-nav__link">
<span class="md-ellipsis">
Starting the server
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../example-requests/" class="md-nav__link">
<span class="md-ellipsis">
Example request
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../metadata/" class="md-nav__link">
<span class="md-ellipsis">
Metadata
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_4" checked>
<label class="md-nav__link" for="__nav_3_4" id="__nav_3_4_label" tabindex="0">
<span class="md-ellipsis">
Identity provider
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_3_4_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_3_4">
<span class="md-nav__icon md-icon"></span>
Identity provider
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../identity-provider/" class="md-nav__link">
<span class="md-ellipsis">
Overview
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
<span class="md-ellipsis">
JSON API
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
JSON API
</span>
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#finding-api-urls" class="md-nav__link">
<span class="md-ellipsis">
Finding API URLs
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#api-requests" class="md-nav__link">
<span class="md-ellipsis">
API requests
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#authorization" class="md-nav__link">
<span class="md-ellipsis">
Authorization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#redirecting" class="md-nav__link">
<span class="md-ellipsis">
Redirecting
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controls" class="md-nav__link">
<span class="md-ellipsis">
Controls
</span>
</a>
<nav class="md-nav" aria-label="Controls">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#controlsmain" class="md-nav__link">
<span class="md-ellipsis">
controls.main
</span>
</a>
<nav class="md-nav" aria-label="controls.main">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#controlsmainindex" class="md-nav__link">
<span class="md-ellipsis">
controls.main.index
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsmainlogins" class="md-nav__link">
<span class="md-ellipsis">
controls.main.logins
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#controlsaccount" class="md-nav__link">
<span class="md-ellipsis">
controls.account
</span>
</a>
<nav class="md-nav" aria-label="controls.account">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#controlsaccountcreate" class="md-nav__link">
<span class="md-ellipsis">
controls.account.create
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsaccountlogout" class="md-nav__link">
<span class="md-ellipsis">
controls.account.logout
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsaccountwebid" class="md-nav__link">
<span class="md-ellipsis">
controls.account.webId
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsaccountpod" class="md-nav__link">
<span class="md-ellipsis">
controls.account.pod
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsaccountclientcredentials" class="md-nav__link">
<span class="md-ellipsis">
controls.account.clientCredentials
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#controlspassword" class="md-nav__link">
<span class="md-ellipsis">
controls.password
</span>
</a>
<nav class="md-nav" aria-label="controls.password">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#controlspasswordcreate" class="md-nav__link">
<span class="md-ellipsis">
controls.password.create
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlspasswordlogin" class="md-nav__link">
<span class="md-ellipsis">
controls.password.login
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlspasswordforgot" class="md-nav__link">
<span class="md-ellipsis">
controls.password.forgot
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlspasswordreset" class="md-nav__link">
<span class="md-ellipsis">
controls.password.reset
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#controlsoidc" class="md-nav__link">
<span class="md-ellipsis">
controls.oidc
</span>
</a>
<nav class="md-nav" aria-label="controls.oidc">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#controlsoidccancel" class="md-nav__link">
<span class="md-ellipsis">
controls.oidc.cancel
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsoidcprompt" class="md-nav__link">
<span class="md-ellipsis">
controls.oidc.prompt
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsoidcwebid" class="md-nav__link">
<span class="md-ellipsis">
controls.oidc.webId
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsoidcforgetwebid" class="md-nav__link">
<span class="md-ellipsis">
controls.oidc.forgetWebId
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsoidcconsent" class="md-nav__link">
<span class="md-ellipsis">
controls.oidc.consent
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlshtml" class="md-nav__link">
<span class="md-ellipsis">
controls.html
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#example" class="md-nav__link">
<span class="md-ellipsis">
Example
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../login-method/" class="md-nav__link">
<span class="md-ellipsis">
New login method
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../migration/" class="md-nav__link">
<span class="md-ellipsis">
Data migration
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../client-credentials/" class="md-nav__link">
<span class="md-ellipsis">
Client credentials
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../seeding-pods/" class="md-nav__link">
<span class="md-ellipsis">
Seeding pods
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../notifications/" class="md-nav__link">
<span class="md-ellipsis">
Notifications
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../dev-configuration/" class="md-nav__link">
<span class="md-ellipsis">
Development server
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../authorization-methods/" class="md-nav__link">
<span class="md-ellipsis">
Authorization methods
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" >
<label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0">
<span class="md-ellipsis">
Architecture
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4">
<span class="md-nav__icon md-icon"></span>
Architecture
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../architecture/overview/" class="md-nav__link">
<span class="md-ellipsis">
Overview
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../architecture/dependency-injection/" class="md-nav__link">
<span class="md-ellipsis">
Dependency injection
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../architecture/core/" class="md-nav__link">
<span class="md-ellipsis">
Core
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_4" >
<label class="md-nav__link" for="__nav_4_4" id="__nav_4_4_label" tabindex="0">
<span class="md-ellipsis">
Features
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_4_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_4">
<span class="md-nav__icon md-icon"></span>
Features
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../architecture/features/cli/" class="md-nav__link">
<span class="md-ellipsis">
Command line arguments
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../architecture/features/initialization/" class="md-nav__link">
<span class="md-ellipsis">
Server initialization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../architecture/features/http-handler/" class="md-nav__link">
<span class="md-ellipsis">
HTTP requests
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_4_4" >
<label class="md-nav__link" for="__nav_4_4_4" id="__nav_4_4_4_label" tabindex="0">
<span class="md-ellipsis">
Solid protocol
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_4_4_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_4_4">
<span class="md-nav__icon md-icon"></span>
Solid protocol
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../architecture/features/protocol/overview/" class="md-nav__link">
<span class="md-ellipsis">
Overview
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../architecture/features/protocol/parsing/" class="md-nav__link">
<span class="md-ellipsis">
Parsing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../architecture/features/protocol/authorization/" class="md-nav__link">
<span class="md-ellipsis">
Authorization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../architecture/features/protocol/resource-store/" class="md-nav__link">
<span class="md-ellipsis">
Resource Store
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../architecture/features/protocol/patching/" class="md-nav__link">
<span class="md-ellipsis">
Modifying resources
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4_4_5" >
<label class="md-nav__link" for="__nav_4_4_5" id="__nav_4_4_5_label" tabindex="0">
<span class="md-ellipsis">
Account management
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_4_4_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4_4_5">
<span class="md-nav__icon md-icon"></span>
Account management
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../architecture/features/accounts/overview/" class="md-nav__link">
<span class="md-ellipsis">
Overview
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../architecture/features/accounts/controls/" class="md-nav__link">
<span class="md-ellipsis">
Controls
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../architecture/features/accounts/routes/" class="md-nav__link">
<span class="md-ellipsis">
Routes
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../../architecture/features/notifications/" class="md-nav__link">
<span class="md-ellipsis">
Notifications
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" >
<label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">
<span class="md-ellipsis">
Contributing
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5">
<span class="md-nav__icon md-icon"></span>
Contributing
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../contributing/making-changes/" class="md-nav__link">
<span class="md-ellipsis">
Pull requests
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../contributing/release/" class="md-nav__link">
<span class="md-ellipsis">
Releases
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../../docs/" target="_blank" class="md-nav__link">
<span class="md-ellipsis">
API
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#finding-api-urls" class="md-nav__link">
<span class="md-ellipsis">
Finding API URLs
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#api-requests" class="md-nav__link">
<span class="md-ellipsis">
API requests
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#authorization" class="md-nav__link">
<span class="md-ellipsis">
Authorization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#redirecting" class="md-nav__link">
<span class="md-ellipsis">
Redirecting
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controls" class="md-nav__link">
<span class="md-ellipsis">
Controls
</span>
</a>
<nav class="md-nav" aria-label="Controls">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#controlsmain" class="md-nav__link">
<span class="md-ellipsis">
controls.main
</span>
</a>
<nav class="md-nav" aria-label="controls.main">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#controlsmainindex" class="md-nav__link">
<span class="md-ellipsis">
controls.main.index
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsmainlogins" class="md-nav__link">
<span class="md-ellipsis">
controls.main.logins
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#controlsaccount" class="md-nav__link">
<span class="md-ellipsis">
controls.account
</span>
</a>
<nav class="md-nav" aria-label="controls.account">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#controlsaccountcreate" class="md-nav__link">
<span class="md-ellipsis">
controls.account.create
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsaccountlogout" class="md-nav__link">
<span class="md-ellipsis">
controls.account.logout
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsaccountwebid" class="md-nav__link">
<span class="md-ellipsis">
controls.account.webId
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsaccountpod" class="md-nav__link">
<span class="md-ellipsis">
controls.account.pod
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsaccountclientcredentials" class="md-nav__link">
<span class="md-ellipsis">
controls.account.clientCredentials
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#controlspassword" class="md-nav__link">
<span class="md-ellipsis">
controls.password
</span>
</a>
<nav class="md-nav" aria-label="controls.password">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#controlspasswordcreate" class="md-nav__link">
<span class="md-ellipsis">
controls.password.create
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlspasswordlogin" class="md-nav__link">
<span class="md-ellipsis">
controls.password.login
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlspasswordforgot" class="md-nav__link">
<span class="md-ellipsis">
controls.password.forgot
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlspasswordreset" class="md-nav__link">
<span class="md-ellipsis">
controls.password.reset
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#controlsoidc" class="md-nav__link">
<span class="md-ellipsis">
controls.oidc
</span>
</a>
<nav class="md-nav" aria-label="controls.oidc">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#controlsoidccancel" class="md-nav__link">
<span class="md-ellipsis">
controls.oidc.cancel
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsoidcprompt" class="md-nav__link">
<span class="md-ellipsis">
controls.oidc.prompt
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsoidcwebid" class="md-nav__link">
<span class="md-ellipsis">
controls.oidc.webId
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsoidcforgetwebid" class="md-nav__link">
<span class="md-ellipsis">
controls.oidc.forgetWebId
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlsoidcconsent" class="md-nav__link">
<span class="md-ellipsis">
controls.oidc.consent
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlshtml" class="md-nav__link">
<span class="md-ellipsis">
controls.html
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#example" class="md-nav__link">
<span class="md-ellipsis">
Example
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<h1 id="account-management-json-api">Account management JSON API<a class="headerlink" href="#account-management-json-api" title="Permanent link">&para;</a></h1>
<p>Everything related to account management is done through a JSON API,
of which we will describe all paths below.
There are also HTML pages available to handle account management
that use these APIs internally.
Links to these can be found in the HTML controls
All APIs expect JSON as input, and will return JSON objects as output.</p>
<h2 id="finding-api-urls">Finding API URLs<a class="headerlink" href="#finding-api-urls" title="Permanent link">&para;</a></h2>
<p>All URLs below are relative to the index account API URL, which by default is <code>http://localhost:3000/.account/</code>.
Every response of an API request will contain a <code>controls</code> object,
containing all the URLs of the other API endpoints.
It is generally advised to make use of these controls instead of hardcoding the URLs.
Only the initial index URL needs to be known then to find the controls.
Certain controls will be missing if those features are disabled in the configuration.</p>
<h2 id="api-requests">API requests<a class="headerlink" href="#api-requests" title="Permanent link">&para;</a></h2>
<p>Many APIs require a POST request to perform an action.
When doing a GET request on these APIs they will return an object describing what input is expected for the POST.</p>
<h2 id="authorization">Authorization<a class="headerlink" href="#authorization" title="Permanent link">&para;</a></h2>
<p>After logging in, the API will return a <code>set-cookie</code> header of the format <code>css-account=$VALUE</code>
This cookie is necessary to have access to many of the APIs.
When including this cookie, the controls object will also be extended with new URLs that are now accessible.
When logging in, the response body JSON body will also contain an <code>authorization</code> field
containing the <code>$VALUE</code> value mentioned above.
Instead of using cookies,
this value can be used in an <code>Authorization</code> header with value <code>CSS-Account-Token $VALUE</code>
to achieve the same result.</p>
<p>The expiration time of this cookie will be refreshed
every time there is a successful request to the server with that cookie.</p>
<h2 id="redirecting">Redirecting<a class="headerlink" href="#redirecting" title="Permanent link">&para;</a></h2>
<p>As redirects through status codes 3xx can make working with JSON APIs more difficult,
the API will never make use of this.
Instead, if a redirect is required after an action,
the response JSON object will return a <code>location</code> field.
This is the next URL that should be fetched.
This is mostly relevant in OIDC interactions as these cause the interaction to progress.</p>
<h2 id="controls">Controls<a class="headerlink" href="#controls" title="Permanent link">&para;</a></h2>
<p>Below is an overview of all the keys in a controls object returned by the server,
with all features enabled.
An example of what such an object looks like can be found at the <a href="#example">bottom</a> of the page.</p>
<h3 id="controlsmain">controls.main<a class="headerlink" href="#controlsmain" title="Permanent link">&para;</a></h3>
<p>General controls that require no authentication.</p>
<h4 id="controlsmainindex">controls.main.index<a class="headerlink" href="#controlsmainindex" title="Permanent link">&para;</a></h4>
<p>General entrypoint to the API.
Returns an empty object, including the controls, on all GET requests.</p>
<h4 id="controlsmainlogins">controls.main.logins<a class="headerlink" href="#controlsmainlogins" title="Permanent link">&para;</a></h4>
<p>Returns an overview of all login systems available on the server in <code>logins</code> object.
Keys are a string description of the login system and values are links to their login pages.
This can be used to let users choose how they want to log in.
By default, the object only contains the email/password login system.</p>
<h3 id="controlsaccount">controls.account<a class="headerlink" href="#controlsaccount" title="Permanent link">&para;</a></h3>
<p>All controls related to account management.
All of these require authorization, except for the create action.</p>
<h4 id="controlsaccountcreate">controls.account.create<a class="headerlink" href="#controlsaccountcreate" title="Permanent link">&para;</a></h4>
<p>Creates a new account on empty POST requests.
The response contains the necessary cookie values to log in.
This account can not be used until a login method has been added to it.
All other interactions will fail until this is the case.
See the <a href="#controlspasswordcreate">controls.password.create</a> section below for more information on how to do this.
This account will expire after some time if no login method is added.</p>
<h4 id="controlsaccountlogout">controls.account.logout<a class="headerlink" href="#controlsaccountlogout" title="Permanent link">&para;</a></h4>
<p>Logs the account out on an empty POST request.
Invalidates the cookie that was used.</p>
<h4 id="controlsaccountwebid">controls.account.webId<a class="headerlink" href="#controlsaccountwebid" title="Permanent link">&para;</a></h4>
<p>GET requests return all WebIDs linked to this account in the following format:</p>
<div class="highlight"><pre><span></span><code><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;webIdLinks&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;http://localhost:3000/test/profile/card#me&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/account/c63c9e6f-48f8-40d0-8fec-238da893a7f2/webid/fdfc48c1-fe6f-4ce7-9e9f-1dc47eff803d/&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</code></pre></div>
<p>The URL value is the resource URL corresponding to the link with this WebID.
The link can be removed by sending a DELETE request to that URL.</p>
<p>POST requests link a WebID to the account,
allowing the account to identify as that WebID during an OIDC authentication interaction.
Expected input is an object containing a <code>webId</code> field.
The response will include the resource URL.</p>
<p>If the chosen WebID is contained within a Solid pod created by this account,
the request will succeed immediately.
If not, an error will be thrown,
asking the user to add a specific triple to the WebID to confirm that they are the owner.
After this triple is added, a second request will be successful.</p>
<h4 id="controlsaccountpod">controls.account.pod<a class="headerlink" href="#controlsaccountpod" title="Permanent link">&para;</a></h4>
<p>GET requests return all pods created by this account in the following format:</p>
<div class="highlight"><pre><span></span><code><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;pods&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;http://localhost:3000/test/&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/account/c63c9e6f-48f8-40d0-8fec-238da893a7f2/pod/df2d5a06-3ecd-4eaf-ac8f-b88a8579e100/&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</code></pre></div>
<p>The URL value is the resource URL corresponding to the link with this WebID.
Doing a GET request to this resource will return the base URl of the pod, and all its owners of a pod, as shown below.
You can send a POST request to this resource with a <code>webId</code> and <code>visible: boolean</code> field
to add/update an owner and set its visibility.
Visibility determines whether the owner is exposed through a link header when requesting the pod.
You can also send a POST request to this resource with a <code>webId</code> and <code>remove: true</code> field to remove the owner.</p>
<div class="highlight"><pre><span></span><code><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;baseUrl&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/my-pod/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;owners&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;webId&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/my-pod/profile/card#me&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;visible&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">]</span>
<span class="p">}</span>
</code></pre></div>
<p>POST requests to <code>controls.account.pod</code> create a Solid pod for the account.
The only required field is <code>name</code>, which will determine the name of the pod.</p>
<p>Additionally, a <code>settings</code> object can be sent along,
the values of which will be sent to the templates used when generating the pod.
If this <code>settings</code> object contains a <code>webId</code> field,
that WebID will be the WebID that has initial access to the pod.</p>
<p>If no WebID value is provided,
a WebID will be generated in the pod and immediately linked to the account
as described in <a href="#controlsaccountwebid">controls.account.webID</a>.
This WebID will then be the WebID that has initial access.</p>
<h4 id="controlsaccountclientcredentials">controls.account.clientCredentials<a class="headerlink" href="#controlsaccountclientcredentials" title="Permanent link">&para;</a></h4>
<p>GET requests return all client credentials created by this account in the following format:</p>
<div class="highlight"><pre><span></span><code><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;clientCredentials&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;token_562cdeb5-d4b2-4905-9e62-8969ac10daaa&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/account/c63c9e6f-48f8-40d0-8fec-238da893a7f2/client-credentials/063ee3a7-e80f-4508-9f79-ffddda9df8d4/&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</code></pre></div>
<p>The URL value is the resource URL corresponding to that specific token.
Sending a GET request to that URL will return information about the token,
such as what the associated WebID is.
The token can be removed by sending a DELETE request to that URL.</p>
<p>Creates a client credentials token on POST requests.
More information on these tokens can be found <a href="../../client-credentials/">here</a>.
Expected input is an object containing a <code>name</code> and <code>webId</code> field.
The name is optional and will be used to name the token,
the WebID determines which WebID you will identify as when using that token.
It needs to be a WebID linked to the account as described in <a href="#controlsaccountwebid">controls.account.webID</a>.</p>
<h3 id="controlspassword">controls.password<a class="headerlink" href="#controlspassword" title="Permanent link">&para;</a></h3>
<p>Controls related to managing the email/password login method.</p>
<h4 id="controlspasswordcreate">controls.password.create<a class="headerlink" href="#controlspasswordcreate" title="Permanent link">&para;</a></h4>
<p>GET requests return all email/password logins of this account in the following format:</p>
<div class="highlight"><pre><span></span><code><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;passwordLogins&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;test@example.com&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/account/c63c9e6f-48f8-40d0-8fec-238da893a7f2/login/password/7f042779-e2b2-444d-8cd9-50bd9cfa516d/&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</code></pre></div>
<p>The URL value is the resource URL corresponding to the login with the given email address.
The login can be removed by sending a DELETE request to that URL.
The password can be updated by sending a POST request to that URL
with the body containing an <code>oldPassword</code> and a <code>newPassword</code> field.</p>
<p>POST requests create an email/password login and adds it to the account you are logged in as.
Expects <code>email</code> and <code>password</code> fields.</p>
<h4 id="controlspasswordlogin">controls.password.login<a class="headerlink" href="#controlspasswordlogin" title="Permanent link">&para;</a></h4>
<p>POST requests log a user in and return the relevant cookie values.
Expected fields are <code>email</code>, <code>password</code>, and optionally a <code>remember</code> boolean.
The <code>remember</code> value determines if the returned cookie is only valid for the session,
or for a longer time.</p>
<h4 id="controlspasswordforgot">controls.password.forgot<a class="headerlink" href="#controlspasswordforgot" title="Permanent link">&para;</a></h4>
<p>Can be used when a user forgets their password.
POST requests with an <code>email</code> field will send an email with a link to reset the password.</p>
<h4 id="controlspasswordreset">controls.password.reset<a class="headerlink" href="#controlspasswordreset" title="Permanent link">&para;</a></h4>
<p>Used to handle reset password URLs generated when a user forgets their password.
Expected input values for the POST request are <code>recordId</code>,
which was generated when sending the reset mail,
and <code>password</code> with the new password value.</p>
<h3 id="controlsoidc">controls.oidc<a class="headerlink" href="#controlsoidc" title="Permanent link">&para;</a></h3>
<p>These controls are related to completing OIDC interactions.</p>
<h4 id="controlsoidccancel">controls.oidc.cancel<a class="headerlink" href="#controlsoidccancel" title="Permanent link">&para;</a></h4>
<p>Sending a POST request to this API will cancel the OIDC interaction
and return the user to the client that started the interaction.</p>
<h4 id="controlsoidcprompt">controls.oidc.prompt<a class="headerlink" href="#controlsoidcprompt" title="Permanent link">&para;</a></h4>
<p>This API is used to determine what the next necessary step is in the OIDC interaction.
The response will contain a <code>location</code> field,
containing the URL to the next page the user should go to,
and a <code>prompt</code> field,
indicating the next step that is necessary to progress the OIDC interaction.
The three possible prompts are the following:</p>
<ul>
<li><strong>account</strong>: The user needs to log in, so they have an account cookie.</li>
<li><strong>login</strong>: The user needs to pick the WebID they want to use in the resulting OIDC token.</li>
<li><strong>consent</strong>: The user needs to consent to the interaction.</li>
</ul>
<h4 id="controlsoidcwebid">controls.oidc.webId<a class="headerlink" href="#controlsoidcwebid" title="Permanent link">&para;</a></h4>
<p>Relevant for solving the <strong>login</strong> prompt.
GET request will return a list of WebIDs the user can choose from.
This is the same result as requesting the account information and looking at the linked WebIDs.
The POST requests expects a <code>webId</code> value and optionally a <code>remember</code> boolean.
The latter determines if the server should remember the picked WebID for later interactions.</p>
<h4 id="controlsoidcforgetwebid">controls.oidc.forgetWebId<a class="headerlink" href="#controlsoidcforgetwebid" title="Permanent link">&para;</a></h4>
<p>POST requests to this API will cause the OIDC interaction to forget the picked WebID
so a new one can be picked by the user.</p>
<h4 id="controlsoidcconsent">controls.oidc.consent<a class="headerlink" href="#controlsoidcconsent" title="Permanent link">&para;</a></h4>
<p>A GET request to this API will return all the relevant information about the client doing the request.
A POST requests causes the OIDC interaction to finish.
It can have an optional <code>remember</code> value, which allows for refresh tokens if it is set to true.</p>
<h4 id="controlshtml">controls.html<a class="headerlink" href="#controlshtml" title="Permanent link">&para;</a></h4>
<p>All these controls link to HTML pages and are thus mostly relevant to provide links to let the user navigate around.
The most important one is probably <code>controls.html.account.account</code> which links to an overview page for the account.</p>
<h2 id="example">Example<a class="headerlink" href="#example" title="Permanent link">&para;</a></h2>
<p>Below is an example of a controls object in a response.</p>
<div class="highlight"><pre><span></span><code><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;main&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;index&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;logins&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/login/&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;account&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;create&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/account/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;logout&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/account/ade5c046-e882-4b56-80f4-18cb16433360/logout/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;webId&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/account/ade5c046-e882-4b56-80f4-18cb16433360/webid/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;pod&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/account/ade5c046-e882-4b56-80f4-18cb16433360/pod/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;clientCredentials&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/account/ade5c046-e882-4b56-80f4-18cb16433360/client-credentials/&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;password&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;create&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/account/ade5c046-e882-4b56-80f4-18cb16433360/login/password/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;login&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/login/password/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;forgot&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/login/password/forgot/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;reset&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/login/password/reset/&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;oidc&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;cancel&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/oidc/cancel/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;prompt&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/oidc/prompt/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;webId&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/oidc/pick-webid/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;forgetWebId&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/oidc/forget-webid/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;consent&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/oidc/consent/&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;html&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;main&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;login&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/login/&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;account&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;createClientCredentials&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/account/ade5c046-e882-4b56-80f4-18cb16433360/client-credentials/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;createPod&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/account/ade5c046-e882-4b56-80f4-18cb16433360/pod/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;linkWebId&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/account/ade5c046-e882-4b56-80f4-18cb16433360/webid/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;account&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/account/ade5c046-e882-4b56-80f4-18cb16433360/&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;password&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;register&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/login/password/register/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;login&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/login/password/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;create&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/account/ade5c046-e882-4b56-80f4-18cb16433360/login/password/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;forgot&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;http://localhost:3000/.account/login/password/forgot/&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</code></pre></div>
</article>
</div>
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
</div>
<button type="button" class="md-top md-icon" data-md-component="top" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12Z"/></svg>
Back to top
</button>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
<div class="md-social">
<a href="https://github.com/CommunitySolidServer/CommunitySolidServer" target="_blank" rel="noopener" title="github.com" class="md-social__link">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
</a>
<a href="https://hub.docker.com/r/solidproject/community-server" target="_blank" rel="noopener" title="hub.docker.com" class="md-social__link">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M349.9 236.3h-66.1v-59.4h66.1v59.4zm0-204.3h-66.1v60.7h66.1V32zm78.2 144.8H362v59.4h66.1v-59.4zm-156.3-72.1h-66.1v60.1h66.1v-60.1zm78.1 0h-66.1v60.1h66.1v-60.1zm276.8 100c-14.4-9.7-47.6-13.2-73.1-8.4-3.3-24-16.7-44.9-41.1-63.7l-14-9.3-9.3 14c-18.4 27.8-23.4 73.6-3.7 103.8-8.7 4.7-25.8 11.1-48.4 10.7H2.4c-8.7 50.8 5.8 116.8 44 162.1 37.1 43.9 92.7 66.2 165.4 66.2 157.4 0 273.9-72.5 328.4-204.2 21.4.4 67.6.1 91.3-45.2 1.5-2.5 6.6-13.2 8.5-17.1l-13.3-8.9zm-511.1-27.9h-66v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm-78.1-72.1h-66.1v60.1h66.1v-60.1z"/></svg>
</a>
<a href="https://www.npmjs.com/package/@solid/community-server" target="_blank" rel="noopener" title="www.npmjs.com" class="md-social__link">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M288 288h-32v-64h32v64zm288-128v192H288v32H160v-32H0V160h576zm-416 32H32v128h64v-96h32v96h32V192zm160 0H192v160h64v-32h64V192zm224 0H352v128h64v-96h32v96h32v-96h32v96h32V192z"/></svg>
</a>
<a href="https://gitter.im/CommunitySolidServer/community" target="_blank" rel="noopener" title="gitter.im" class="md-social__link">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M66.4 322.5H16V0h50.4v322.5zM166.9 76.1h-50.4V512h50.4V76.1zm100.6 0h-50.4V512h50.4V76.1zM368 76h-50.4v247H368V76z"/></svg>
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "../../..", "features": ["navigation.instant", "navigation.tabs", "navigation.top", "navigation.indexes"], "search": "../../../assets/javascripts/workers/search.b8dbb3d2.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"provider": "mike"}}</script>
<script src="../../../assets/javascripts/bundle.fe8b6f2b.min.js"></script>
</body>
</html>