#How to use Export one game

27 messages · Page 1 of 1 (latest)

round radish
calm shale
#

do you need the pgn?

round radish
#

this is the code doesn't work

#

json example is better

#

how do i get this

calm shale
#

you need the content-type header

round radish
#

can you explain more detailed?

calm shale
#

check how to set accepting content type in your http library

round radish
#

then attach this to axios.get

calm shale
#

yeah I guess, I don't know axios

round radish
#

just tell me what to type at content-type header

calm shale
round radish
#

I try post method and still same response :(

axios.post('https://lichess.org/game/export/xVLVFwRiCisP', {}, { headers: { 'Content-Type': 'application/json' } })

calm shale
#

remove the last 4 characters

#

the game id should be 8 chars without the the 4 character fingerprints

round radish
#

where did you get that information

#

i read lichess api guide and didnt notice

calm shale
#

I just ran two queries and saw the responses
curl -H 'Accept: application/json' https://lichess.org/game/export/xVLVFwRiCisP
curl -H 'Accept: application/json' https://lichess.org/game/export/xVLVFwRi

round radish
#

what's the meaning of last four characters in the link

#

Oh I see, that's because i searched the game from a user

#

and these chars about the user that i searched from

#

thanks a lot buddy you saved me from depression .d