Skip to content
  • Add PHP API

    NodeBB Development
    32
    0 Votes
    32 Posts
    19k Views
    S
    <?php class nodebb { function category_add ($params='name=Default category name', $token='e9de6fb6-1234-5678-8bbc-b5073fd1edef'){ shell_exec('/usr/bin/curl -H "Authorization: Bearer '.$token.'" --data "'.$params.'" http://localhost:4567/forum/api/v1/categories'); } } $nodebb = new nodebb; $nodebb->category_add(); return false; Now it's much easier