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

/api/challenge/{username} position parameter #30

Closed
Beddie opened this issue Apr 19, 2020 · 2 comments
Closed

/api/challenge/{username} position parameter #30

Beddie opened this issue Apr 19, 2020 · 2 comments

Comments

@Beddie
Copy link

Beddie commented Apr 19, 2020

The position parameter does not work.
Reproduce http request:

POST /api/challenge/{username} HTTP/1.1
Host: lichess.org
Authorization: Bearer
Content-Type: application/x-www-form-urlencoded

rated=false&variant=standard&position=rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 1 1&color=white&clock.limit=300&clock.increment=2

The position value will be encoded when request is made. Also tested with already encoded position value.

@ornicar
Copy link
Contributor

ornicar commented Apr 19, 2020

try variant=fromPosition

@Beddie
Copy link
Author

Beddie commented Apr 19, 2020

Hi ornicar,

Thank you. Using this variant = fromPosition i do get an 400 Bad Request error, see json below:
{
"global": [
"Invalid FEN"
],
"error": {
"global": [
"Invalid FEN"
]
}
}

The FEN i use as value for key:position is valid. Do i need other key's as well? Do you have a working FEN? Thanks

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

No branches or pull requests

2 participants