I have installed the com_api component and plugin from the official site for REST calls. I should authenticate user login with a web service at another domain using REST POST. How should I do it? I have the login form and how should I make POST request after submitting the form. There is no proper documentation and no tutorials even. Please help.

  • 2
    Welcome tot JSE Rex. TechJoomla.com has a Documentation page, Forum and Support Ticket system. Have you tried using them first?
    – Lodder
    Commented Mar 24, 2016 at 9:40

1 Answer 1


In the context of a REST Api, each call is stateless. So, there is no "user login".

In a Joomla site, when a user is authenticated, the browser receives a cookie to authorize the navigation and access to restricted areas.

Thus, in a REST Api, you have to implement an authorization protocol, like OAuth, to generate access tokens.

  • In TechJoomla's com_api, you call the authentication request with user and password (there's also an option for a global key), check ApiAuthenticationLogin and ApiAuthentication.

    $app = JFactory::getApplication();
    $key = $app->input->get('key','','STRING');
        $key = $app->input->post->get('key','','STRING');
        $this->set('auth_method', $params->get('auth_method', 'login'));
        $this->set('auth_method', $params->get('auth_method', 'key'));
  • In the upcoming Joomla 3.6, a new Joomla official REST API will be included and it's currently being developed, more info here Preparing for webservices API in 3.6.

Github repo: Joomla Webservices

In this case, authentication is temporarily based on Redcore_Oauth2.

Webservices in redCORE provide a RESTfull (Representational state transfer) interface for your site using HAL as a easy way to hyperlink between resources. Generating mapping XML file which will expose your webservice is very easy and you can read about them in following chapters.

We highly recommend using OAuth2 Server together with webservice API since it already brings token manipulation and ease of access to the data. redCORE already provide OAuth2 Server functionality and you can read more information here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.