2

I am developing a mobile app that needs to authenticate users with a Joomla 4 site. I want to use the official Joomla REST API to do this, but I couldn’t find any information about how to authenticate a user and get an API Token with the official Joomla REST API. Can anyone provide some guidance on how to do this? I know the API token can be generated in the user profile, but that is not relevant to my question. the API does not have a Login function.

2 Answers 2

1

I'm exactly in the same situtation. Mobile app users need to log in with their Joomla credentials. Seems like an obvious feature for a REST api. We used the cAPI plugin which offered this for Joomla 3.x but not Joomla 4.

Could you find a solution?

0

See the Joomla manual, in particular the "Using the PHP cURL Functions" part (because you probably run it outside the Joomla framework) : https://manual.joomla.org/docs/general-concepts/webservices#using-the-php-curl-functions

An interesting article about using the Web Services API: https://magazine.joomla.org/all-issues/march-2023/playing-with-the-joomla-api-part-1

2
  • 1
    To use the API (for example, in mobile Apps), the user must register first; after that, the login function must return the API Token. But apparently, this is not possible. Commented Nov 20, 2023 at 6:00
  • That's correct. At this moment, the Token functionality for access is limited to Super User accounts.
    – pe7er
    Commented Nov 20, 2023 at 9:23

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.