Skip to content

AuthRestore

A backup rebuilds the server, but nobody comes back with it: members who were banned, kicked or who lost the server altogether have to be invited again, one by one, if you can even reach them. AuthRestore solves that. Members verify once through Discord and give iHorizon permission to add them to a server; on the bad day, you add them all back with one command, to the same server or to a brand new one.

It's iHorizon's own take on tools like RestoreCord or VaultCord, built into the bot.

How it works

You put a Verify button on a message of iHorizon with /authrestore set, and choose the role verified members get. You receive the server's secret key.

A member clicks Verify. Discord asks them to authorise iHorizon. Once they accept, iHorizon records them for this server, gives them the role, and sends them back to the server.

The server is nuked (or deleted). Your key and the list of verified members are stored by iHorizon, outside the server: they're untouched.

You run /authrestore force-join with the key, on the server you want them on. iHorizon adds every verified member who isn't there yet, and gives you a new key.

Clicking Verify opens Discord's own authorisation page for iHorizon, with three permissions:

Discord permission What iHorizon does with it
Their account (username, avatar) Knows who verified: ID, username, display name, language, and when
The list of their servers Checks whether they're already on the server before adding them
Join servers for them Adds them to the server, now if they aren't on it, and later with a force-join

iHorizon keeps the authorisation Discord gives it (and renews it when it expires), so it still works months later. Nobody is added without having clicked Verify and accepted.

Members can withdraw

A member who no longer wants this removes iHorizon from User Settings → Authorized Apps in Discord. From then on, a force-join can't add them anymore.

What a key holder can do

The members agreed to be added to servers by iHorizon. Whoever holds your key can add your verified members to any server where iHorizon is. That's what lets you rebuild elsewhere, and it's why the key must stay secret.

Set it up

1. Post the message. The button can only go on a message sent by iHorizon: Discord doesn't let a bot add buttons to someone else's message. Create a nice one with the embed tool (/utils embed), in a channel every member can see, for example #verify. Copy its ID (right-click → Copy Message ID, with Developer Mode on).

2. Pick the role. Members get it when they verify, so it's also a good way to see who verified. It must sit below iHorizon's role: if iHorizon can't give it, the verification fails and the member isn't recorded.

3. Run the command:

/authrestore set channel:#verify message_id:1442519876543210496 role:@Verified

iHorizon replaces the message's buttons with a Verify link button and answers, only to you:

/authrestore set
iHorizonAPPToday at 15:40
@Lina, you have just set up the "AuthRestore" module. Now, when a member of the Discord server clicks on the button and logs in via OAuth2, they will be added to the database. They will eventually be able to automatically join the server with OAuth2.
READ CAREFULLY
The message https://discord.com/channels/…/…/1442519876543210496 now has a button that will serve as a verification.
HERE IS THE PRIVATE CODE THAT MUST NOT BE DISCLOSED TO ANYONE. A PERSON WITH THIS CODE COULD DELETE IT, ADD MEMBERS TO THEIR SERVER... KEEP IT SOMEWHERE SAFE. iHorizon WILL NEVER GIVE IT TO YOU AGAIN:
aK3fP9xQ2mZr7TbW1cYs5vLd
Only you can see this message

You also get the key by DM ("The AuthRestore code for Pixel Haven"), and a last line tells you whether that DM went through. Store the key outside Discord right away.

Refusal Cause
"In Discord, the bot cannot edit components of a message from another user…" The message wasn't sent by iHorizon
"Error: HorizonGateway maybe down" iHorizon's service that stores AuthRestore couldn't be reached: try again later. Nothing was changed
"This server already has an AuthRestore key, so I did not create a new one…" AuthRestore is already set up here. Running /authrestore set again would replace the key, so iHorizon refuses. To start over with a new key, run /authrestore delete first, then /authrestore set

Then tell your members

A button nobody clicks protects nobody. Announce it, pin the message, make the role worth having (a colour, a channel). Check how many verified with /authrestore get.

The key

The key is a 24-character code made of letters and digits. It belongs to the server it was created on, and it's the only thing /authrestore force-join and /authrestore get ask for.

It changes in two cases:

When What happens
After every force-join The key used is destroyed and a new one is given to you (in the channel, only to you, and by DM). Note the new one: the old one no longer works
When /authrestore set is run after /authrestore delete on the server A new key replaces the previous one. The members who already verified are kept

While the button is up, /authrestore set refuses to run again: "This server already has an AuthRestore key, so I did not create a new one…". A key is never replaced by accident.

An administrator can still replace the key on purpose

/authrestore delete then /authrestore set need Administrator, not the old key. An administrator who runs both receives a fresh key, and yours stops working. Keep Administrator for people you trust with your members, or put a command rule on authrestore.

Lost the key?

Run /authrestore delete, then /authrestore set again (on an iHorizon message, with the role): you get a new key, and every member already verified stays on the list.

Bring members back: /authrestore force-join

Run it on the server the members should join: the same server after a nuke, or a new server if the old one is gone. iHorizon must be on that server, since it adds the members itself.

/authrestore force-join key:aK3fP9xQ2mZr7TbW1cYs5vLd

iHorizon counts the members first and asks for confirmation:

/authrestore force-join
iHorizonAPPToday at 02:31
AuthRestore - Force Join
Are you sure to force-join members in this guild?
READ CAREFULLY:
IF YOU CONFIRM THIS ACTION, THE CURRENT PRIVATE KEY WILL BE DESTROYED. A NEW KEY WILL BE PROVIDED TO YOU.
Members found 1,340 · Members already here 920 · Possible join 420
ConfirmCancel
  • Members found: everyone who verified on the key's server.
  • Members already here: those already on this server, skipped.
  • Possible join: the others, the ones iHorizon will try to add.

Confirm starts it; the message follows the progress ("Force-joining in progress...", then the Joined count) and ends with "Force-joining process completed." The new key arrives right after, only to you and by DM. Cancel deletes the message, and the key doesn't change.

What to know:

  • Members join without any role. The verification role isn't given back by a force-join. To give everyone their roles back, load a backup with Members afterwards (see the order).
  • Each of them is an ordinary arrival for iHorizon: welcome message, join roles, and the gates. A captcha or a minimum account age would kick them one after the other: switch those off for the duration of the force-join (Members brought in by AuthRestore).
  • Banned members can't be added. Lift the bans first: restoring Bans from a backup does it for the bans made after the backup.
  • Some members can't be added: those who removed iHorizon from their authorised apps, deleted their account, or are already in as many servers as Discord allows. They aren't counted in Joined.
  • Big lists are handled in batches of 500. Each batch replaces the key, and you always end up with the last one, even if a batch fails halfway: the message then says "The force-join stopped before the end…" and gives you the key in force.
  • Nobody to add? If every verified member is already on the server, iHorizon says so and keeps your key: "Every verified member is already on this server: there is nobody to add. Your key has not changed."

Rebuilding on a new server

If the server was deleted, create a new one, invite iHorizon, give it its role on top, load your backup there, then run the force-join on it with the old server's key. The key works from any server iHorizon is on.

Look up a key: /authrestore get

/authrestore get key:… shows the AuthRestore of the key's server: the server ID, the role given, when and by whom it was created, how many times the key was used, then the list of verified members (5 per page) and a page of statistics (verifications over the last 30 days, languages, latest verifications). Each look-up counts as a use of the key.

The reply is only visible to you, since it lists your verified members' names.

Change the role: /authrestore roles

/authrestore roles key:aK3fP9xQ2mZr7TbW1cYs5vLd roles:@Member

From now on, members who verify get this role instead. The key must be this server's. Members who already verified keep their current roles.

Remove the button: /authrestore delete

/authrestore delete takes the Verify button off the message, and iHorizon forgets which message it was on. Your key and the members already verified are kept: you can still bring them back with /authrestore force-join, and put a new button up with /authrestore set (which gives a new key: the old one stops working). If the message or its channel was deleted in the meantime, /authrestore delete still forgets it, so /authrestore set works again.

From the dashboard

In the dashboard, the Auth restore module changes the message the button is on (once /authrestore set was done, since it picks the role), and the AuthRestore Keys tool lists the keys you created and shows a restore's details like /authrestore get, 5 look-ups per hour per account.

Next