# windows
py -3 -m pip install -U FortniteAPIAsync
# linux/macos
python3 -m pip install -U FortniteAPIAsync
import FortniteAPIAsync
import asyncio
async def get_current_aes() -> None:
client = FortniteAPIAsync.APIClient()
aes = await client.get_aes()
print(f'AES key for {aes.build} - {aes.main_key}')
# outputs: AES key for ++Fortnite+Release-39.40-CL-50341043 - 67e127d5c846a0d426be...
await client.close()
asyncio.run(get_current_aes())import rebootpy
import FortniteAPIAsync
from rebootpy.ext import commands
bot = commands.Bot(
command_prefix='!',
auth=rebootpy.AuthorizationCodeAuth(
code=input('Enter authorization code: ')
)
)
@bot.command()
async def skin(ctx: rebootpy.ext.commands.Context, *, content: str) -> None:
try:
async with FortniteAPIAsync.APIClient() as client:
cosmetic = await client.get_cosmetic(
matchMethod="contains",
name=content,
backendType="AthenaCharacter"
)
await bot.party.me.set_outfit(asset=cosmetic.id)
await ctx.send(f'Skin set to {cosmetic.id}.')
except FortniteAPIAsync.exceptions.NotFound:
await ctx.send(f"Failed to find a skin with the name: {content}.")
bot.run()