API Documentation

Chesspastebin feature an API so that other software out there could add, view and remove games from the database. The get an API account please send an email to toomasr@gmail.com and you will receive an API key.

Adding games

URL: http://www.chesspastebin.com/api/add/
Method: POST
Returns: Prints out the ID (integer). You can view the game at http://www.chesspastebin.com/?p=ID

Key Value Comment
apikey Your API key Required
pgn The PGN of the game Required
name Name of the uploader Optional. Defaults to Noname
email Email of the uploader Optional. Defaults to no_body@no_where.org
sandbox true | false Optional. Defaults to false. In case of true will not add the post but will do the regular validation of the request. On success will print out 42 as the ID.

Removing games

Not implemented at the moment.

  • Pingback: Updated design & API documentation | Chess Pastebin()

  • Le Do Hoang Long

    Great idea!

    How to get an api key? I want to make a little web application for this!

  • http://www.zeroturnaround.com/ Toomas Römer

    Sent you one in private. As there are not very many request then I do it manually.

  • chess player

    I like this program !
    I have http://locchess.wordpress.com and i want to install it. 
    Can you help me ?

  • http://www.zeroturnaround.com/ Toomas Römer

    There is a WordPress plugin that uses this library as the backend. See http://wordpress.org/extend/plugins/chess-game-viewer-control-panel/

    Hope this helps,

  • Minh-Tue Vo

    Hi ! Can you export the board as gif or png?

  • http://www.zeroturnaround.com/ Toomas Ru00f6mer

    Not at the moment but I kind of like the idea. What exactly do you have in mind? You play couple of moves and click on download as gif? Why not take a screenshot?