$redirectUrl = OpenIdSession::getAuthorizationUrl(
    $baseUrl,
    array('openid', 'profile', 'address', 'email', 'phone',
        'https://uri.paypal.com/services/paypalattributes', 'https://uri.paypal.com/services/expresscheckout'),
    null,
    null,
    null,
    $apiContext
);
Get User Consent URL
The clientId is stored in the bootstrap file