Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated So REST API Will Work With Bot #120

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WhoWhoDilly69
Copy link

First time coding something this i guess complicated since im self taught..this is assuming you have RESTAPIEnabled=True RESTAPIPort=8212
In your palwordsettings.ini
I hardcoded it so admin is the default username so when you do /addserver and it asks for ip port there will also be a box that says username:password only enter you admin password for your server. The reason why the box says username:password is because REST API uses BASE64 to encode your password to access stuff, so i set it up where you enter your password regurlarly and then the script will now the username is admin then take your password and encode it with base64 spit that code out into the script and then decode it to get access to the server then itll send the very basic comman curl -L -X GET 'http://localhost:8212/v1/api/info' \ -H 'Accept: application/json'
-H 'Authorization: xxxxxxx

where your ip is what you entered in the pop up it then accepts the api application from palworld which asks for the authorization password which you entered and its converted...this is all i could figure out, i couldnt get it to work like the other servers with the fancy symbols and green buttons but hopefully the original person who created this will be able to edit what i did and pretty it up.

First time coding something this i guess complicated since im self taught..this is assuming you have RESTAPIEnabled=True
RESTAPIPort=8212
In your palwordsettings.ini
I hardcoded it so admin is the default username so when you do /addserver and it asks for ip port there will also be a box that says username:password only enter you admin password for your server. The reason why the box says username:password is because REST API uses BASE64 to encode your password to access stuff, so i set it up where you enter your password regurlarly and then the script will now the username is admin then take your password and encode it with base64 spit that code out into the script and then decode it to get access to the server then itll send the very basic comman
curl -L -X GET 'http://localhost:8212/v1/api/info' \
-H 'Accept: application/json' \
-H 'Authorization: xxxxxxx

where your ip is what you entered in the pop up it then accepts the api application from palworld which asks for the authorization password which you entered and its converted...this is all i could figure out, i couldnt get it to work like the other servers with the fancy symbols and green buttons but hopefully the original person who created this will be able to edit what i did and pretty it up.
@xLeviNx
Copy link
Contributor

xLeviNx commented Oct 2, 2024

I'd recommend pushing these updates to https://github.com/opengsq/opengsq-python

@WhoWhoDilly69
Copy link
Author

i honestly wish i knew how to do that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants