Skip to content

TriggerNotificationEvent - incorrect example for passing attributes to localApi call #287

Description

@Makinami

In localApi example, attributes are passed same as in over the network call, while they should be defined as regular PHP array.
https://developers.whmcs.com/api-reference/triggernotificationevent/

Working example:

// ...
$postData = array(
    'notification_identifier' => 'custom.server.add',
    'title' => 'New Server Added',
    'message' => 'new-server.examplehost.com added as a cPanel server and is available for provisioning.',
    'url' => 'https://whmcs.example.test/admin/configservers.php?action=manage&id=3',
    'status' => 'Success',
    'statusStyle' => 'info',
    'attributes' => [
        [
            'label' => 'example',
            'value' => 'example',
            'url' => 'https://whmcs.example.test/admin/configservers.php?action=manage&id=3',
            'style' => 'success',
            'icon' => 'example',
        ],
    ],
);
// ...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions