Developing android native application using scribe library, and uses Rest based web services from existing Magento based eCommerce platform.
I have got prerequisite requirement like 'Key' and 'Secret' from the Magento based Oauth Consumer.
Since,there are three user in existing scenario like, registered customer, admin and guest user.
For registered customer and admin Iam able to get the outh token and secret token after fulfilling the authorization url link and allowing the app to access my account.
But initially I wanted to access the rest services and display product list as a guest user(not registered with application) but each time It ask for authorization url.
I'am sharing part of code snippet please go through it.
OAuthService service = new ServiceBuilder()
.provider(MagentoThreeLeggedOAuth.class)
.apiKey(MAGENTO_API_KEY)
.apiSecret(MAGENTO_API_SECRET)
.debug()
.build();
Token requestToken = service.getRequestToken();
String authorizationUrl = service.getAuthorizationUrl(requestToken);
/*popup window which displays authorization from the user*/
startActivity(new Intent("android.intent.action.VIEW", Uri.parse(authorizationUrl)));
How to get the secret token for guest user?
Thanks in advance.