diff --git a/templates/zerver/api/private-message.md b/templates/zerver/api/private-message.md index e01e5e49aa..56a1332459 100644 --- a/templates/zerver/api/private-message.md +++ b/templates/zerver/api/private-message.md @@ -128,11 +128,4 @@ address is invalid: } ``` -A typical failed JSON response for when the API key is invalid: - -``` -{ - 'msg':'Invalid API key', - 'result':'error' -} -``` +{!invalid-api-key-json-response.md!} diff --git a/templates/zerver/api/stream-message.md b/templates/zerver/api/stream-message.md index afdab1b7cc..f2fe8d7083 100644 --- a/templates/zerver/api/stream-message.md +++ b/templates/zerver/api/stream-message.md @@ -147,11 +147,4 @@ A typical failed JSON response for when the target stream does not exist: } ``` -A typical failed JSON response for when the API key is invalid: - -``` -{ - 'msg':'Invalid API key', - 'result':'error' -} -``` +{!invalid-api-key-json-response.md!} diff --git a/templates/zerver/help/include/invalid-api-key-json-response.md b/templates/zerver/help/include/invalid-api-key-json-response.md new file mode 100644 index 0000000000..94e45328c7 --- /dev/null +++ b/templates/zerver/help/include/invalid-api-key-json-response.md @@ -0,0 +1,8 @@ +A typical failed JSON response for when the API key is invalid: + +``` +{ + 'msg':'Invalid API key', + 'result':'error' +} +```