custom plugin with custom POST url

Plugin Development
  • I need to create a plugin that creates a url like


    another app will POST to that URL with some encripted information with user information, and then need nodebb to update user information to that information in the POST ( I already know how to decript the data, and how to do all user update info calls, I just dont know how to create the endpoint for POST this info)

    I know I can create GET urls like this

    router.get('/update-user-api', middleware.buildHeader, render);
    router.get('/api/update-user-api', render);

    but can find documentation on how to create url for POST. Any help? maybe something that is laready done I can use as example?

  • @sebastián-cisneros In static:api.routes, you'll want to call controllerHelpers.setupAPIRoute to mount the route to the appropriate /api/v3/plugins mount point.

    You can see an example of how we do it in the quickstart plugin

Suggested Topics