Simple API for https://github.com/ambozz/Paste
- Download api.php to your Webserver.
- Done.
- Download Source Code to your Webserver.
- Edit config.php to fill in your Database Configuration.
- Done.
Example Request:
GET api.php?action=create&content=test
Example Response:
{"error":false,"id":"62a5439ac5917"}
Example Request:
GET api.php?action=get&id=62a5439ac5917
Example Response:
{"error":false,"content":"test","create_time":1654997914}
- ACTION_UNDEFINED: No action GET Parameter set.
- ACTION_INVALID: action GET Parameter does not contain a valid action.
- CONTENT_UNDEFINED: No content GET Parameter set.
- CONTENT_EMPTY: content GET Parameter is empty.
- CREATE_FAILED: Failed to insert paste into database.
- ID_UNDEFINED: No id GET Parameter set.
- ID_EMPTY: id GET Parameter is empty.
- PASTE_NOT_FOUND: A paste with that id does not exist.