Skip to content

AddRegistrationOrDeviceTokenResponse deserialize fails #5

@sk-hasbridge

Description

@sk-hasbridge

I'm getting an exception when attempting to call addRegistrationOrDeviceToken() on the User API. It appears that the mapping for the token property is incorrect in AddRegistrationOrDeviceTokenResponse.php. It's currently set to

'token' => 'string[]',

and should instead be

'token' => 'string',

Stack trace (clipped)

"message": "Invalid array 'string[]'",
    "exception": "InvalidArgumentException",
    "file": "/var/www/html/vendor/sendbird/sendbird-platform-sdk-php/lib/ObjectSerializer.php",
    "line": 363,
    "trace": [
        {
            "file": "/var/www/html/vendor/sendbird/sendbird-platform-sdk-php/lib/ObjectSerializer.php",
            "line": 478,
            "function": "deserialize",
            "class": "Sendbird\\ObjectSerializer",
            "type": "::"
        },
        {
            "file": "/var/www/html/vendor/sendbird/sendbird-platform-sdk-php/lib/Api/UserApi.php",
            "line": 203,
            "function": "deserialize",
            "class": "Sendbird\\ObjectSerializer",
            "type": "::"
        },
        {
            "file": "/var/www/html/vendor/sendbird/sendbird-platform-sdk-php/lib/Api/UserApi.php",
            "line": 134,
            "function": "addRegistrationOrDeviceTokenWithHttpInfo",
            "class": "Sendbird\\Api\\UserApi",
            "type": "->"
        },

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