---
title: "MGS9020: malformed share request"
description: A request to open a share link carried a body that is not JSON of the form {"ttl_seconds":N}, answered 400. An empty body takes the default lifetime.
tags: [MGS9020, auth, share, "400"]
---

# MGS9020: malformed share request

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

```text
[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](MGS9018.md), not this.

## See also

- [Tokens and grants](../../../concepts/tokens.md)
