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 command on our server: /apply 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 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 (^14.13.0) and Superagent (^8.1.2)

JavaScript
const { EmbedBuilder } = require('discord.js');
const { get } = require('superagent');
    
exports.run = async (interaction) => {
    const member = interaction.options.getMember('member') || interaction.member;
                    
    const { body } = await get('https://weebyapi.xyz/gif/pat')
        .set('Authorization', 'Bearer YOUR_TOKEN');
                            
    const patEmbed = new EmbedBuilder()
        .setTitle('**Pat 😇**')
        .setColor('#e889e0')
        .setDescription(`**${interaction.user.username}** patted **${member.user.username}!**`)
        .setImage(body.url);
                    
    await interaction.reply({ embeds: [patEmbed] });
}

Generator Example: Discord.js (^14.13.0) and Superagent (^8.1.2)

JavaScript
const { EmbedBuilder, AttachmentBuilder } = require('discord.js');
const { get } = require('superagent');
                            
exports.run = async (interaction) => {
    const { body } = await get('https://weebyapi.xyz/generators/3000years')
        .query({ image: interaction.user.displayAvatarURL({ extension: 'png', size: 2048 }) })
        .set('Authorization', 'Bearer YOUR_TOKEN');
            
    const embed = new EmbedBuilder()
        .setTitle('**3000 Years**')
        .setColor('#ed8a5c')
        .setImage('attachment://3000years.png');
            
    await interaction.reply({ embeds: [embed], files: [new AttachmentBuilder(body, { name: '3000years.png' })] });
}

Other

Wrappers: