Skip to content

Commit d433e3b

Browse files
committed
MSC2918: specify error codes for the refresh API
1 parent b320001 commit d433e3b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

proposals/2918-refreshtokens.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ response:
5151
}
5252
```
5353

54+
The `refresh_token` parameter can be invalid for two reasons:
55+
56+
- if it does not exist
57+
- if it was already used once
58+
59+
In both cases, the server must reply with a `401` HTTP status code and an `M_UNKNOWN_TOKEN` error code.
60+
This new use case of the `M_UNKNOWN_TOKEN` error code must be reflected in the spec.
61+
5462
### Device handling
5563

5664
The current spec states that "Matrix servers should record which device each access token is assigned to".

0 commit comments

Comments
 (0)