diff --git a/versioned_docs/version-4.0.0/dev/server/apis/http/graph/index.md b/versioned_docs/version-4.0.0/dev/server/apis/http/graph/index.md index 07e6adf1..37c8a9f5 100644 --- a/versioned_docs/version-4.0.0/dev/server/apis/http/graph/index.md +++ b/versioned_docs/version-4.0.0/dev/server/apis/http/graph/index.md @@ -63,4 +63,16 @@ For development purposes the examples in the developer documentation use Basic A To authenticate with a Bearer token or OpenID Connect access token replace the `-u user:password` Basic Auth option of curl with a `-H 'Authorization: Bearer '` header. A `` can be obtained by copying it from a request in the browser, although it will time out within minutes. To automatically refresh the OpenID Connect access token an ssh-agent like solution like [oidc-agent](https://github.com/indigo-dc/oidc-agent) should be used. The graph endpoints that support a preconfigured token can be found in the [API specification](https://github.com/opencloud-eu/libre-graph-api) +#### Authorization with App token + +Users can create an App Token in their Open Cloud interface. This token can be used to authenticate a user using the Account Name for the username and the token as password. Here is an example using curl + +```sh +curl 'https://cloud.opencloud.test/graph/v1.0/me' -H 'accept: application/json' -u 'accountname:the generated app token' + +# or using the Authentification Basic Header +# Authentification: Basic BASE64(username + ':' + app token) +curl 'https://cloud.opencloud.test/graph/v1.0/me' -H 'accept: application/json' -H 'Authorization: Basic YWNjb3VudG5hbWU6dGhlIGdlbmVyYXRlZCBhcHAgdG9rZW4=' +``` + ## Resources