Skip to content

403 error in topic send #15

@download69

Description

@download69

hi
when i use simple send, i don't have any problem and it send successfully.
but when i use send with topic, it returned 403 code ...

my codes :
` var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Token ****");

        var response = await client.PostAsync(
            "https://api.pushe.co/v2/messaging/notifications/",
            getTopicNotificationData(Title, content, token)
        );

        var status_code = (int)response.StatusCode;`

`var data = new JObject();
data.Add("title", Title);
data.Add("content", content);
data.Add("action", "{"action_type":"G"}");

        var topics = new JObject();
        topics.Add("topics", new JArray(new String[] { token }));

        var request_data = new JObject();
        request_data.Add("app_ids", new JArray(new String[] { "****" }));
        request_data.Add("data", data);
        request_data.Add("topics", topics);

        //      Console.WriteLine("Request data: " + request_data.ToString());

        return new StringContent(request_data.ToString(), Encoding.UTF8, "application/json");`

is any solution to solve it ...

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