We've looked at requesting Extended Permissions from the user at the initial login stage, and seen how that works, but it's not infallible. Now we're going to look at actually requesting those permissions midway through our application.
There are two approaches we can take with regards to the management of permissions and requesting of additional ones. The first approach, which we'll explore in this recipe, is to try an API request, and if it fails, request the additional permissions we need for that request, before retrying the original API request. (The second approach we'll cover in the recipe Pre-emptively requesting additional Extended Permissions.)
In this recipe we're going to avoid requesting permissions during the initial login process, and instead request them midway through the application.