pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.7k stars 1.7k forks source link

API problem to create a server (403 error) #4012

Closed savalet closed 2 years ago

savalet commented 2 years ago

Current Behavior

Hello I have a problem with the API of my panel pterodactyl. When I want to interact with it, for example by creating a server, I get a 403 error: image

Expected Behavior

That the API of my panel create well the server without worries.

Steps to Reproduce

Use this code: image

Panel Version

1.6.5

Wings Version

1.6.1

Games and/or Eggs Affected

Minecraft All

Docker Image

quay.io/pterodactyl/core:java

Error Logs

https://bin.ptdl.co/6fopz/

Is there an existing issue for this?

yesBad commented 2 years ago

Sounds like wrong API key :P

savalet commented 2 years ago

I didn't think so but recreating an api key partly solved the problem now I have this error: image

Jelcoo commented 2 years ago

You should remove the cookie header and replace API KEY inside Authorisation with your api key

savalet commented 2 years ago

I put my API key and I also removed the header cookie but I still have the same error.

parkervcp commented 2 years ago

You replace API TOKEN in your authorization header with the api token you got from the panel.

savalet commented 2 years ago

Yes I did: image

parkervcp commented 2 years ago

a 422 is still you sending an invalid request to the panel. You are sending data it doesn't accept.

savalet commented 2 years ago

Ok but how do I fix this problem that it would be bad data? Here is the body that I send : image

savalet commented 2 years ago

Do you have an example?

savalet commented 2 years ago

I have found the problems ! Thank you for the helping. =) image