THIS IS NOT THE DUPLICATED POST OF What API does the Magento Mobile Store native app use?
Now i want to develop mobile app for this website. So for webservice i have created a custom module. In this module i have a controller called mobileApi. In this mobileApiController i am writing all webservice function. For an example getAllProducts().
Now, on the other hand i want to use magento rest api for access token and Access token secret. If the access to rest api is valid then only my custom controller i.e. mobileApiController will return data.
I want the system to work like this, At the time of App launch mobile app will call a webservice to authenticate the rest api access, and the webservice will return valid access token and Access token secret. After that on every webservice call it will first validate the rest api access, If access is valid then serve then serve the data otherwise shows authentication error.
I have developed everything and all is working fine, but the problem is at the time of App Launch, when i call the service to get access token and access token secret, magento system takes me to a page where it asks for authentication.
Screenshot (step 1) After Login it shows me this page.
Screenshot (step 2) Then if i authenticate the access then rest api get authenticated and returns access token and access token secret then webservice start serving the data.
But how do I manage this authentication from app? I need to skip these two step (step1 and step2).
I want to call the webservice to get the access token and access token secret at the app launch and right away get the access token and access token secret without these step 1 i.e. login and step 2 authorization.
Thanks in advance.
And my question is different than What API does the Magento Mobile Store native app use?. I have search a lot about this but didn't find any similar. So, don't give me any stack overflow/stack exchange link. No body asked this question earlier.