Posted January 18, 2023 13 hours ago, FortyTwo said: 1) When I set up mine I used the details for my VPS (virtual private server). Localhost is fine for local development and testing but you'll need to fill out the API with the details of where you'll eventually be deploying your site. If you need to change them in the future, you can just email TJ with the new details. So for mine: Site URL: chazza.me IP: IP of my VPS (your webhost should provide this) 2) a) Correct. b) Also correct. Don't leak the private key (easily done if you accidentally call the API from the frontend instead of backend). API usage is in the documentation but essentially if your key is ABCDEFGHI1234565 and you want to fetch a user's dragons (the /user call) then your website will need to make a GET request to https://dragcave.net/api/ABCDEFGHI1234565/json/user/Kingchobab Currently the public key is only used if you require the login verification functionality. I don't use it myself but as I understand it: Your website has a link that takes the user to dragcave.net/api_login/PUBLICKEYABC123 They enter their credentials Dragcave redirects to your return URL with a one-time login key specified e.g. https://chazza.me/login.php?key=abcxyz123 Your site then makes a call to https://dragcave.net/api/PRIVATEKYE/json/login/LOGINKEY and returns whether the login was successful or not. 3) Not sure, you'll need to try that one! Thank you very much for your detailed answer!! I didn't understand the login process, but now I got it! Share this post Link to post
Posted August 3, 2023 Good to see this post still exists after 13 years! ::blows off the dust:: 🤣 I feel it probably needs a major overhaul and updates. I think at this point in my programming knowledge/experience I would go the JSON/JS route for a potential hatchery. That being said, while I will edit my initial post (clean up the links and such) to have both PHP and JS resources, I'd most likely lean more heavily into JS. Lots to think about and reorganize! Share this post Link to post
Recommended Posts