You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -538,12 +538,12 @@ <h2 style="color: orangered;">By using this website and API you are agreeing to
538
538
539
539
<!-- #MARKER Errors -->
540
540
<divclass="docHeader targetBlink" id="errors"><aclass="headerAnchorContainer" href="#errors" title="Click to link to this header">🔗</a><spanclass="docHeaderText">Errors:</span></div>
541
-
In <!--%#INSERT:NAME#%--> all response data, no matter from which endpoint will have an "error" parameter.<br>
541
+
In <!--%#INSERT:NAME#%--> all response data, no matter from which endpoint will have a boolean "error" parameter.<br>
542
542
Usually, it is set to false, which means there was no error in your request or on the server.<br>
543
543
If the "error" parameter is set to true though, there was an error and <!--%#INSERT:NAME#%--> will add an "internalError", "message", "causedBy", "additionalInfo" and "timestamp" parameter.<br>
544
544
<br>
545
545
The "internalError" parameter will be set to false, if the error was due to a malformed or failed request and it will be true, if the error is <!--%#INSERT:NAME#%-->'s fault.<br>
546
-
The "message" parameter will contain a short version of the error message and the "timestamp" parameter will contain a 13-character UNIX timestamp in Central European time (GMT+1).<br>
546
+
The "message" parameter will contain a short version of the error message and the "timestamp" parameter will contain a 13-character Unix timestamp.<br>
547
547
The "causedBy" parameter is an array of possible causes of this error and the "addidionalInfo" parameter contains a more descriptive error message.<br>
548
548
<br>
549
549
You can view an example of an error, where an invalid category was used, just below this paragraph.<br>
@@ -615,11 +615,18 @@ <h2 style="color: orangered;">By using this website and API you are agreeing to
615
615
<td>Internal Server Error</td>
616
616
<td>There was a general internal error within <!--%#INSERT:NAME#%-->. You can get more info from the properties in the response text</td>
617
617
</tr>
618
+
<tr>
619
+
<tdclass="dr">523</td>
620
+
<td>Origin Unreachable</td>
621
+
<td>My server is temporarily offline due to maintenance or a dynamic IP update. Please be patient in this case.</td>
@@ -671,8 +678,11 @@ <h2 style="color: orangered;">By using this website and API you are agreeing to
671
678
This endpoint provides some information on <!--%#INSERT:NAME#%-->:<br>
672
679
- The version number<br>
673
680
- The amount of jokes<br>
681
+
- All the available categories, flags, types and formats<br>
674
682
- A 13-character UNIX timestamp<br>
675
-
- The URL to a joke submission form
683
+
- The URL to a joke submission form<br>
684
+
- The minimum and maximum values of an ID range<br>
685
+
- A string with some information, like a message of the day
676
686
<br><br>
677
687
Supported URL parameters:<br>
678
688
<ul>
@@ -848,6 +858,17 @@ <h2 style="color: orangered;">By using this website and API you are agreeing to
848
858
</ul>
849
859
850
860
861
+
862
+
<!-- #MARKER API Tokens -->
863
+
<divclass="docHeader targetBlink" id="api-tokens"><aclass="headerAnchorContainer" href="#api-tokens" title="Click to link to this header">🔗</a><spanclass="docHeaderText">API Tokens:</span></div>
864
+
<!--%#INSERT:NAME#%--> has a way of whitelisting certain clients. This is achieved through an API token.<br>
865
+
At the moment, you will only receive one of these tokens temporarily if something breaks or if you are a business and need more than <!--%#INSERT:RATELIMITCOUNT#%--> requests per minute.<br>
866
+
If you do end up receiving a token, using it is as easy as adding an <mark>Authorization</mark> header with the actual token as its value.<br>
867
+
You will receive a response header called <mark>Token-Valid</mark> which will contain the number 1 if the token is valid.<br>
868
+
If the token is invalid, the Token-Valid header will be set to 0 and <!--%#INSERT:NAME#%--> will treat your request as if you didn't supply a token in the first place.
869
+
870
+
871
+
851
872
<!-- #MARKER Examples -->
852
873
<divclass="docHeader targetBlink" id="examples"><aclass="headerAnchorContainer" href="#examples" title="Click to link to this header">🔗</a><spanclass="docHeaderText">Examples:</span></div>
853
874
These are some examples in some commonly used languages to show you how you could implement <!--%#INSERT:NAME#%-->:<br><br>
@@ -1115,17 +1136,22 @@ <h2 style="color: orangered;">By using this website and API you are agreeing to
0 commit comments