Joke

FREE
By LemmoTresto
Updated a month ago
Entertainment
8.5/10
Popularity Score
873ms
Latency
95%
Success Rate

Joke API Documentation

This api allows you to submit, retrieve and vote for jokes!

View API Details
v1
POSTSubmit a joke for approval
POSTDownvote a joke
GETGet random joke
GETGet a joke by id
GETGet a property from a joke
POSTUpvote a joke
POSTSubmit a joke for approval

This endpoint allows you to submit a joke for approval

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
Joke bodyJSON_STRING
REQUIRED
Code Snippet
unirest.post("https://joke3.p.rapidapi.com/v1/joke")
.header("X-RapidAPI-Host", "joke3.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/json")
.send({"content":"A joke here","nsfw":"false"})
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://joke3.p.rapidapi.com/v1/joke
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://joke3.p.rapidapi.com/v1/joke")
.header("X-RapidAPI-Host", "joke3.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/json")
.send({"content":"A joke here","nsfw":"false"})
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication