I'm developing an application in java, which gets all the data it needs (customers, products, orders, etc.) from someone's Magento store through the Magento REST api based on OAuth authentication. I read a lot of Magento documentation connected with REST APIs and looked through the web hoping to find a solution for my problem, but it looks like nobody hadn't done it before.
According to the image shown below, Magento shall provide my application with a consumer key and a consumer secret (this image is present in the official documentation). But, in fact, it occurs in another way: merchant needs to create REST user for my application, set REST roles and permissions manually and after that he inputs a ConsumerKey and a ConsumerSecret to a someplace, where my application could get it.
Guys, please help to implement the following workflow of usage of Magento REST API:
A merchant clicks on some button in my application -> he is redirected to some page with a prompt to enter his credentials -> he confirms the access to his store for my application -> the application gets some data from his store. Actually, the workflow described on the image below. I have already experienced in data retrieving with manual REST user registration in my test Magento store, but it looks to be impossible to get consumer key and consumer secret as it shown on the image. I'm looking forward for your support. Thanks.