Question: Unable To Call Rest Api

Unable To Call Rest Api

Hello, When I call API than server give this type of response. So can you please help us to setup API. if in this script any kind of setup require for rest API call kindly help me out

NP

Nimit Parekh

Asked

Hello,

When I call API than server give this type of response. So can you please help us to setup API.

if in this script any kind of setup require for rest API call kindly help me out if any documentation or link is available.

Thanks, Nimit Parekh

  • MS

    Mian Saleem

    Answered

    Hello,

    Simple Forum don’t have full APIs just few endpoints for WP plugin. You can check app/controllers/api/Forumapi.php the _get and _post shouldn’t be included in the api call as these are the request methods. You can make post request to base_url/api/user not to api/user_post

    Thank you

  • NP

    Nimit Parekh

    Answered

    Thanks for the reply,

    I would like to call the REST API into your script to create users and retrieve user data from DB.

    While I implement my own API it’s denied the POST request so kindly suggest me how can I implement into this script.

    Thanks, Nimit Parekh

  • MS

    Mian Saleem

    Answered

    Hello,

    You should enable APIs in settings and then generate API key. You need to pass the SF-API-KEY header with api key while calling the end point.

    The API key page will have the details for endpoints.

    You can add your own controllers as you need.

    Thank you

  • Login to Reply