Nothing unusual just got the premium sample app here : https://github.com/MyPureCloud/purecloud-premium app. And then performed the above steps because my intention is to build our app over time on top of this code base once setup properly in our staging server(redirectUriBase). At the momement, I encounter error message "Sorry, PureCloud cannot authenticate you at this time" when I always launch the app inside MyPC.
The error "We did not recognize your redirect url" means that the URL sent by the application when it initiates the login does not match the redirect URLs configured for the OAuth client that was used. They must match exactly, character for character. Check to see what the app is sending and what your OAuth client is configured for and update one or the other so they match.
I'm working with the develop on this one. I can confirm that his authorized redirect URI's match in config.js and in the oauth configuration. I have a few questions:
What is the correct Grant Type? We have tried Token Implicit Grant (Browser) and Code Authorization.
In config.js the appName is supposed to "match the integration type name of the Premium App". Where do I find the integration type name?
If there is more than one oauth configuration how purecloud know which one to use?
Lastly, in this case the developer has installed the example Integration via purecloud and then edited it to match his code. Is this recommended? If not how do we install a new integration from scratch to develop against?
When the authorization process is initiated, a client ID is sent with the request. That is the client ID that PureCloud will use when authorizing the user.
Once your premium app is available on the AppFoundry-PureCloud and can be deployed to different orgs it will have its own unique id. This is used mainly for checking if the current org has the premium app available or not so it can display optional messages. You can get the different types available to your org by running (/api/v2/integrations/types). For testing purposes, the default value should be fine or if you don't have the Premium App Sample available in your test org, you can temporarily set any of the default ones' id (eg 'embedded-client-app') so it will pass the check.
That shouldn't be the cause of your current issue though. I'm thinking it might still be using the wrong client id. Could you add this query parameter to your initial endpoint to force the environment. ?environment=mypurecloud.com.au