Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Error When Trying To Create App #11

@MejorCodigo

Description

@MejorCodigo

I keep getting this error when I try to create an app:

stdClass Object
(
    [status] => 
    [code] => 400
    [response] => stdClass Object
        (
            [errors] => Array
                (
                    [0] => Your subdomain must only contain lowercase letters, numbers, and dashes (not as a starting or ending character) and must be between 4 and 14 characters long.
                )

        )

)

This is the code I'm using to create an app:

use NNV\OneSignal\OneSignal;
use NNV\OneSignal\API\App;
  
$oneSignal = new OneSignal("<Auth Key Here>");
$app = new App($oneSignal);

$appData = [
    'name' => 'My App',
    'chrome_web_origin' => "http://my-domain.com",
    'chrome_web_sub_domain' => "https://subdomain.os.tc",
    'apns_env' => 'production'
];

$response = $app->create($appData);

echo "<pre>", print_r($response), "</pre>";

Any help in fixing this issue is greatly appreciated. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions