Luuuna 23 nov, 2024 @ 3:33
Is there a simple request I can make to confirm API key?
basically title.

working on mysql project where i take data from api request, proccess the data then dump it into my database. It's just meant for my games and achievements. Test code works and all that but designing the "log in" it would be cool if i could make some junk request to just check if a key is valid and nothing else. otherwise GPT suggiest using the summaries function, which is workable getting 403 forbidden error but idk, not ideal. also i know of only the 'Steam_Web_API#Interfaces_and_method' methods
Senast ändrad av Luuuna; 23 nov, 2024 @ 3:38
< >
Visar 1-4 av 4 kommentarer
Kargor 23 nov, 2024 @ 3:41 
Why do you want to check the key separately? Just make the actual request and look at the errors that you get back...
Luuuna 23 nov, 2024 @ 3:44 
Ursprungligen skrivet av Kargor:
Why do you want to check the key separately? Just make the actual request and look at the errors that you get back...

That's the way i am doing it. Gotta work with what I have? The reason is though because i think it would be cleaner, it's just a matter of pettyness.
Kargor 23 nov, 2024 @ 5:16 
Ursprungligen skrivet av Luuuna:
Ursprungligen skrivet av Kargor:
Why do you want to check the key separately? Just make the actual request and look at the errors that you get back...

That's the way i am doing it. Gotta work with what I have? The reason is though because i think it would be cleaner, it's just a matter of pettyness.

Not from a technical perspective though. You are making another roundtrip to the server, which increases load for no useful reason.

Also, you could be making the check first, THEN revoke the key before you make the actual production request. So, even an advance check doesn't mean you can skip handling the "no API key"-case on each and every request, which turns your initial query into a true "nop"-request -- effectively, it's not doing anything at all.
Luuuna 23 nov, 2024 @ 7:42 
Ursprungligen skrivet av Kargor:
Ursprungligen skrivet av Luuuna:

Not from a technical perspective though. You are making another roundtrip to the server, which increases load for no useful reason.
Thanks for good info. Web is new to me. You made me discover batch requests are a thing, as a side note. Should learn to difference between what looks clean and what is good for infrastructure, other and local.
< >
Visar 1-4 av 4 kommentarer
Per sida: 1530 50

Datum skrivet: 23 nov, 2024 @ 3:33
Inlägg: 4