Jump to content


General Discussion of Wargaming Public API


  • Please log in to reply
864 replies to this topic

VladKukuev #861 Posted 30 January 2021 - 06:38 PM

    Private

  • Player
  • 1864 battles
  • 2
  • Member since:
    06-02-2017

View PostVladKukuev, on 30 January 2021 - 06:15 PM, said:

Hey, I am observing the wot api. Every time I am making request I am getting back no data - some thing like:

 There are lots of optional properties such as fields, tank_id, language, battle_type... and so on.... , and I think they need to be included to the request to get something back. I didn't find any info about those properties? what values are valid for them? where and how to get the valid values. Any useful docs about how to build the api requests?  Thanks for answers.

 

I think, I figured out this... Api reference is what I need...



Timmel #862 Posted 31 January 2021 - 09:52 PM

    Lance-corporal

  • Player
  • 14793 battles
  • 61
  • Member since:
    08-27-2011

Hi everyone!

 

Quick question:

I am trying to connect to the openID authentication as described here

https://developers.w...wot/auth/login/

 

I've already gotten my code to work and I can login without any problems. Yet there still IS a problem anyway:

The way I got it to work was by using the location header of php. But as it seems the location header is only capable of passing arguments via GET rather than POST. I do not want my application ID to become accessable to the user however - using my method right now, any user could just turn to the dev console of his browser and check the network tab. I am pretty sure there has to be quite a simple way to achieve this but I just seem to be too stupid to figure this out myself. The documentation itself provides a switch for GET / POST and seems to use a form to build the POST-Data.

But as long as I do not want to store my app-ID in some hidden field of the form - which in turn would make it again accessable for any user of the website - or POST it to a script on my server, add the missing arguments there and redirect once again with php header (with the same problem as described initially) and can't figure out a way to do this?

 

Could anyone please help me out?
Thank you guys very much!
Best regards!

Timmel

 

 



Timmel #863 Posted 31 January 2021 - 11:07 PM

    Lance-corporal

  • Player
  • 14793 battles
  • 61
  • Member since:
    08-27-2011

Hi guys!
I thought about this a bit more, looked at other applications and I think I finally figured it out myself:

  1. Set a link to "login.php" on my server for the user to click
  2. Login.php sends an authentication-request to API - important: Set option "nofollow=1" and set "redirect_uri=[...]login.php"
  3. Send request
  4. extract "location" from response to login.php
  5. echo location header with response location to user

I'll try this out and give you guys feedback but I think this should do the trick for me :)

 

Cheers!

Timmel

 

 


Edited by Timmel, 31 January 2021 - 11:09 PM.


LUF3N #864 Posted 06 February 2021 - 11:52 AM

    Lance-corporal

  • Player
  • 16894 battles
  • 64
  • [HXND] HXND
  • Member since:
    11-17-2012

View PostTimmel, on 31 January 2021 - 10:07 PM, said:

Hi guys!
I thought about this a bit more, looked at other applications and I think I finally figured it out myself:

  1. Set a link to "login.php" on my server for the user to click
  2. Login.php sends an authentication-request to API - important: Set option "nofollow=1" and set "redirect_uri=[...]login.php"
  3. Send request
  4. extract "location" from response to login.php
  5. echo location header with response location to user

I'll try this out and give you guys feedback but I think this should do the trick for me :)

 

Cheers!

Timmel

 

 

 

i got it to work with spring framework :)



MonkeyOnKeyboard #865 Posted 02 March 2021 - 07:34 AM

    Corporal

  • Player
  • 38978 battles
  • 108
  • [R1SE] R1SE
  • Member since:
    07-31-2012

Hello, good morning.

 

ive problems with my wg auth login.

 

i get following messages:

 

file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

 

i try to ping api.worldoftanks.eu

but nothing. 

ping api.worldoftanks.eu
ping: api.worldoftanks.eu: Temporary failure in name resolution

 

 

whats the Problem.

On my Server i can ping other hosts and get answers.....

 

PLease can anybody help.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users