Skip to content

Instantly share code, notes, and snippets.

@camnwalter
Last active May 8, 2024 02:35
Show Gist options
  • Save camnwalter/c0156c68b1e2a21ec0b084c6f04b63f0 to your computer and use it in GitHub Desktop.
Save camnwalter/c0156c68b1e2a21ec0b084c6f04b63f0 to your computer and use it in GitHub Desktop.
API Keys After Hypixel's Changes

How to get a new API key after the Hypixel API changes

This key will last forever, and should be for personal use only. Providing a proxy like this to the public is strictly against Hypixel's API Policies.


  1. Go to the Hypixel Developer Dashboard, and log in using your forums account.
  2. Click "Create Development Key" to enable the "Create App" button in the top right.
  3. Create a new app. For this guide, we will make a personal app. Click the Personal API Key button, and fill out the form.
  • For the link field in the application, I just submitted my Cloudflare Workers URL generated in the next section of this guide. Just make sure the link is related to your project in some way.
  1. Once you submit the form, the key should be accepted shortly, just refresh the dashboard. Make sure to copy the api key Hypixel provides you for this application

Now that we have a personal api key, we can now begin the second part, which is to create the backend to protect the api key by keeping it private.

How to host a backend for free using Cloudflare Workers

  1. Now, go to Cloudflare Dashboard and sign up or sign in if you have an account already.
  2. Navigate to the sidebar and go to the Workers & Pages page.
    image
  3. Create a new application.
  4. Create a worker and name it something useful. By default it will have random words and numbers. Then, deploy.
  5. Now we need to edit the code, so click the edit code button. This will redirect you to a page to paste in the code linked here.
  6. Save and deploy. Now we can go back to the worker page, and edit its settings. We need to add the API key we got from the Hypixel Developer Dashboard earlier. image
  7. Click add variable. Name it API_KEY, and then paste in your api key into the value input. Make sure to encrypt the key.
  8. Save and deploy.

Now you've done it! You can now request the hypixel api in your programs by replacing the api.hypixel.net with your worker's url! This will keep your key private and safe, without worrying about it expiring.


Notes: If you ever need to regenerate your api key for any reason, go back to the Developer Dashboard and click Regenerate API Key under your application. Copy the new key and then paste it where you previously put the api key secret.

After that, you're all set. Your new api key will work after the worker gets redeployed.

@camnwalter
Copy link
Author

Maybe? I would've put more details in the description though.

@KarmaG20
Copy link

KarmaG20 commented Jul 9, 2023 via email

@Lacikas
Copy link

Lacikas commented Jul 22, 2023

I need your help please! @camnwalter
I'm trying to do it multible times for the applications, but I got rejected multible times for no reason.
What should I put into,should I do this https://apikey.insert-email-here-b8c.workers.dev or https://hypixelapi.api-key-request.insert-email-here-b8c.workers.dev/ this? (btw that b8c is indeed a valid one just I only censure the email yk)
kép
When I open this ones link down here
kép
This is what it shows
kép
kép
kép

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment