I don't like this approach. So you're challenging player 0 to get a random oponent? I would rather add a separate api call, something like: /api/challenge/random/ 

Or, better:
/api/challenge/get/random/

then
/api/challenge/launch  (cu random-ul primit mai sus)

Also, you need to check if get_random_opponent returned a player.

Also, please update API documentation in this pull request.