Getting Started » Weeby API

Getting Started

As easy as 1, 2, 3. You are ready to GET your first request with our API!.

How it works

Weeby API is a sophisticated API service which provides Discord bot developers or others the simplest ways of getting content such as GIFs, Memes, Image Generators etc. The service provides an easy to use interface and application process that takes away difficult tasks from developers.


Step 1: Getting a Token.

  1. First, join our Discord Server and make an application with our bot. Make sure you read our requirements before applying.
  2. To make an application, run the slash command on our server: /apply [bot ID] [server count] [reason] or by visiting the Dashboard Application Page.
  3. Wait for a response from the Weeby API bot and DO NOT LEAVE THE SERVER. Accepted applications will be DMed a token. DON'T SHOW ANYONE!

Step 2: Making your first Request.

  1. Now that you've been accepted and received the token, test the token with the curl command. Type this in your Shell console:
    Shell $ curl -X GET 'https://weebyapi.xyz/gif/zerotwo' -H 'Authorization: Bearer YOUR_TOKEN'
  2. If successful, you should be able to use our API in your Creation!
  3. You can check our examples or wrappers below! Or view our Documentation.

Authentication

In order to get a token, you will need to join our Discord Server and make an application request with the /apply slash command. Please see above for instructions.

When calling the API, you will need to provide a HTTP-Header with the name Authorization and the value Bearer YOUR_TOKEN where you need to replace 'YOUR_TOKEN' with the token sent by the bot.

You can pass the the token directly by adding a query string to the endpoint url ?token=YOUR_TOKEN

Examples

Live Examples of the endpoints can be found on Nate Bot. Invite the bot to try them out.


GIF Example: Discord.js (^13.1.0) and Superagent (^6.1.0)

JavaScript
const { MessageEmbed } = require("discord.js");
const { get } = require("superagent");
    
exports.run = async (bot, message, args) => {
    let user = message.members.users.first();
    if (!user) return message.channel.send("Please mention a user!");
                    
    const { body } = await get(`https://weebyapi.xyz/gif/pat`)
        .set("Authorization", "Bearer YOUR_TOKEN");
                            
    const patEmbed = new MessageEmbed()
        .setTitle('**Pat 😇**')
        .setDescription(`**${message.author.username}** patted **${user.username}!**`)
        .setImage(body.url)
        .setColor("#e889e0");
                    
    message.channel.send({ embeds: [patEmbed] });
}

Generator Example: Discord.js (^13.1.0) and Superagent (^6.1.0)

JavaScript
const { MessageEmbed, MessageAttachment } = require("discord.js");
const { get } = require("superagent");
                            
exports.run = async (bot, message, args) => {
    const { body } = await get(`https://weebyapi.xyz/generators/3000years`)
        .query({ image: message.author.displayAvatarURL({ format: 'png', size: 2048 }) })
        .set("Authorization", "Bearer YOUR_TOKEN");
            
    const embed = new MessageEmbed()
        .setTitle(`**3000 Years**`)
        .setImage("attachment://3000years.png")
        .setColor(`#ed8a5c`);
            
    message.channel.send({ embeds: [embed], files: [new MessageAttachment(body, `3000years.png`)] });
}

Other

Wrappers: