Authentication
Use the API key to authenticate each request to the API.
The token system is currently disabled. So you can use the api without token !
If you do not have an API key, simply go to https://blague.xyz then in your profile to generate a key for free.
Request Header
    Set your API Key as the Authorization header on every request.
    Example: Authorization: Token

Example

NodeJS / node-fetch

1
const fetch = require("node-fetch")
2
3
fetch('https://blague.xyz/api/joke/random', {
4
headers: { 'Authorization': 'TOKEN' }
5
})
6
.then(res => res.json())
7
.then(json => console.log(json));
Copied!
Dernière mise à jour 3mo ago
Copier le lien
Sommaire
Example