(zettel (meta (back "00001012050600") (backward "00001012050200 00001012050400 00001012050600") (box-number "1") (created "20210126175322") (forward "00001012050200 00001012050400 00001012930000 00001012930500") (modified "20230807165915") (published "20230807165915") (role "manual") (syntax "zmk") (tags "#api #manual #reference #zettelstore") (title "API: Structure of an access token")) (rights 4) (encoding "") (content "If the [[authentication process|00001012050200]] was successful, an access token with some additional data is returned.\nThe same is true, if the access token was [[renewed|00001012050400]].\nThe response is structured as a [[symbolic expression|00001012930000]] list, with the following elements:\n\n# The type of the token, always set to ''\"Bearer\"'', as described in [[RFC 6750|https://tools.ietf.org/html/rfc6750]]\n# The token itself, which is technically the string representation of a [[symbolic expression|00001012930500]] containing relevant data, plus a check sum.\n#* The symbolic expression has the form ''(KIND USERNAME NOW EXPIRE Z-ID)''\n#* ''KIND'' is ''0'' for an API access, ''1'' if it created for the Web user interface.\n#* ''USERNAME'' is the user name of the user.\n#* ''NOW'' is a timestamp of the current time.\n#* ''EXPIRE'' is the timestamp when the access token expires.\n#* ''Z-ID'' is the zettel identifier of the user zettel.\n The symbolic expression is encoded via \"\"base64\"\".\n Based on this encoding, a checksum is calculated, also encoded via \"\"base64\"\".\n Both encoded values are concatenated, with a period (''\".\"'') as a delimiter."))