You need to sign in to do that
Don't have an account?
admintrmp
Do not have permission to open page
Does anyone know why I do not have permission to open up the application once we have granted access from a mobile device?
The message we get is (red is obscured information and message is typed out so not perfectly decoded):
APP_NAME:///mobilesdk/detect/oauth/done#access_token=______________&refresh_token=
______________&instance_url=https://na9.salesforce.com&id=https://login.salesforce.com/id/
______________
Anyone have any ideas?
Thanks
I think the "You do not have permission to open this page" message is an Android webview message. I'm guessing you're trying to load the response URI (shown below) into the webview. You should detect the callback URI at the beginning of it there and intercept it before it hits the webview. The onPageFinished method here kind of shows this: https://github.com/tomgersic/DreamforcengerHunt/blob/master/src/com/modelmetrics/dreamforcengerhunt/viewcontroller/LoginController.java
though I think I actually did let it render in the webview there...
What you could also do, instead of using APP_NAME:///mobilesdk/detect/oauth/done as your redirect URI, you could use https://login.salesforce.com/services/oauth2/success because that will load successfully in a webview.
All Answers
That message is a successful login response. You should parse it and use the access_token value for any future API calls. Keep the refresh_token around to get a new access_token later. This blog post explains the parameters, if it's any help: http://www.modelmetrics.com/tomgersic/oauth-2-0-for-salesforce-com/
This is a successful page despite it saying that I do not have permission to open the page? What a misleading message that is.
We are trying to use jQuery with this, but what exactly do we do from here? How do we from this point to display a page in our mobile apps www folder?
Maybe I'm not understanding -- I don't see anything in that message there that says you don't have permission. What page are you trying to open, and what error message are you getting?
Sorry I forgot to the add the beginning. We get this:
You do not have permission to open this page.
APP_NAME:///mobilesdk/detect/oauth/done#access_token=______________&refresh_token=
______________&instance_url=https://na9.salesforce.com&id=https://login.salesforce.com/id/
______________
Any ideas?
I think the "You do not have permission to open this page" message is an Android webview message. I'm guessing you're trying to load the response URI (shown below) into the webview. You should detect the callback URI at the beginning of it there and intercept it before it hits the webview. The onPageFinished method here kind of shows this: https://github.com/tomgersic/DreamforcengerHunt/blob/master/src/com/modelmetrics/dreamforcengerhunt/viewcontroller/LoginController.java
though I think I actually did let it render in the webview there...
What you could also do, instead of using APP_NAME:///mobilesdk/detect/oauth/done as your redirect URI, you could use https://login.salesforce.com/services/oauth2/success because that will load successfully in a webview.
Fantastic! It was the callback URL. Once again, SFDC documentation (mentioned that the login.salesforce URL was for iOS only) has failed us and premier support were unable to provide an answer.
Thanks for your help. :o)
Cool, glad you got it working.
(KeywordBookmarks (https://www.keywordbookmarks.com/))