Skip to content

Latest commit

 

History

History
107 lines (70 loc) · 2.72 KB

push-notification-configuration.md

File metadata and controls

107 lines (70 loc) · 2.72 KB

Push Notification Configuration

3 operation(s). Part of the API index.

Call these as $client-><service>-><method>(...). <service> is the client field for this group — the README lists the field name for every service. These pages group operations the way the OpenAPI specification tags them, which is not always one field per page.


createPushSettings

POST /v2/manage/2fa/push-notification-settings

Create Push Notification settings

Creates new Push Notification settings for second factor authentication.

Example

function callCreatePushSettings($client) {
    $pushAuthenticator = new \LoginRadius\Sdk\Internal\OpenApi\Model\PushAuthenticator(['isEnabled' => true, 'notificationService' => '<notificationService>', 'customAppName' => '<customAppName>']); //Required

    try {
        $response = $client->pushNotificationConfiguration->createPushSettings($pushAuthenticator);
        echo $response;
    } catch (\LoginRadius\Sdk\Internal\OpenApi\ApiException $e) {
        $lr = \LoginRadius\Sdk\Client::toLoginRadiusException($e);
        echo $lr->description();
    }
}

Request body

PushAuthenticator as application/json.

Returns

PushAuthenticator


getPushSettings

GET /v2/manage/2fa/push-notification-settings

Retrieve Push Notification settings

Retrieves the current Push Notification settings for second factor authentication.

Example

function callGetPushSettings($client) {
    try {
        $response = $client->pushNotificationConfiguration->getPushSettings();
        echo $response;
    } catch (\LoginRadius\Sdk\Internal\OpenApi\ApiException $e) {
        $lr = \LoginRadius\Sdk\Client::toLoginRadiusException($e);
        echo $lr->description();
    }
}

Returns

PushAuthenticator


updatePushSettings

PUT /v2/manage/2fa/push-notification-settings

Update Push Notification settings

Updates existing Push Notification settings for second factor authentication.

Example

function callUpdatePushSettings($client) {
    $pushAuthenticator = new \LoginRadius\Sdk\Internal\OpenApi\Model\PushAuthenticator(['isEnabled' => true, 'notificationService' => '<notificationService>', 'customAppName' => '<customAppName>']); //Required

    try {
        $response = $client->pushNotificationConfiguration->updatePushSettings($pushAuthenticator);
        echo $response;
    } catch (\LoginRadius\Sdk\Internal\OpenApi\ApiException $e) {
        $lr = \LoginRadius\Sdk\Client::toLoginRadiusException($e);
        echo $lr->description();
    }
}

Request body

PushAuthenticator as application/json.

Returns

PushAuthenticator