magus v0.4.3 is out. See what's new
¶ View markdown source · ✎ Suggest an edit

MGS9020: malformed share request

POST /api/v1/share answered 400 invalid argument because its body did not parse.

[MGS9020] the share request body is not JSON of the form {"ttl_seconds": N}:
invalid character 'x' looking for beginning of value
  see: .../MGS9020.md

Why

The body is optional: absent or empty, the link lives the default 15 minutes. A body that is present but does not parse is refused rather than read as the default, because a request for a lifetime nobody can read is not a request for the default one.

Resolution

Send {"ttl_seconds": N} with a lifetime from 60 to 86400 seconds, or no body. A lifetime outside that range is MGS9018, not this.

See also

MGS9020authshare400
Last updated (f0d4ffc9)
Glossary

Op

A single tool-native command a target composes (long form: operation); the middle of the work hierarchy (Spell to Op to Target). See operations.

Conventions

This page uses none of the site's convention markers. The full set is on the conventions page.