Skip to content

A simple PHP file to handle incoming Ko-Fi API webhooks.

License

Notifications You must be signed in to change notification settings

isobellavt/php-kofi-api-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

php-kofi-api-integration

This is a simple PHP "plugin" system, composed of two parts:

  • The main index.php file
  • The send-discord.php file

The main file includes the logic for verifying an API POST came from Ko-Fi's API itself, as well as 'decoding' the JSON payload, and assigning the various values to individual variables, that you can then use for whatever further processing you would like to do.

  • You need to put your own verification token value at the top of the file, where indicated, otherwise this plugin will NOT work for you properly.
  • You will need to ensure that your API setting on your Ko-Fi dashboard, is set to the location that the main file from this plugin, is located at.

The discord file is optional, and only needed if you plan to activate the option to send notifications to a webhook endpoint in your Discord server.

  • You will need to create a webhook in whatever channel you would like, on Discord
  • Change the 'false' to 'true' under the setting at the top of the main file (enable discord sending)
  • Replace the default example webhook address with your own.

If you need help, you can get in touch with me on Discord, under the account isobellavt


Do you like the plugin, and wish to donate?

ko-fi

About

A simple PHP file to handle incoming Ko-Fi API webhooks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages