/** * Starts authorization and returns a "authorization URL" on the Dropbox website that gives the * lets the user grant your app access to their Dropbox account. * * <p> If a redirect URI was specified ({@link Request.Builder#withRedirectUri}), then users * will be redirected to the redirect URI after completing the authorization flow. Call {@link * #finishFromRedirect} with the query parameters received from the redirect. * * <p> If no redirect URI was specified ({@link Request.Builder#withNoRedirect}), then users who * grant access will be shown an "authorization code". The user must copy/paste the * authorization code back into your app, at which point you can call {@link * #finishFromCode(String)} to get an access token. * * @param request OAuth 2.0 web-based authorization flow request configuration * * @return Authorization URL of website user can use to authorize your app. * * @throws IllegalStateException if this {@link DbxWebAuth} instance was created using the * deprecated {@link #DbxWebAuth(DbxRequestConfig,DbxAppInfo,String,DbxSessionStore)} * constructor. */ public String authorize(Request request) { if (deprecatedRequest != null) { throw new IllegalStateException("Must create this instance using DbxWebAuth(DbxRequestConfig,DbxAppInfo) to call this method."); } return authorizeImpl(request); }
return authorizeImpl( deprecatedRequest.copy() .withState(urlState)