Closed duckhue01 closed 1 year ago
I create a notification as following. I received a success message but I don't see any message on the dashboard. Do i miss any field?
package main import ( "context" "fmt" "os" "github.com/OneSignal/onesignal-go-api" ) func main() { notification := *onesignal.NewNotification("app_id") notification.SetIncludeExternalUserIds([]string{"02d670b3-b7d9-4fcf-9535-9f51a2d21616"}) notification.Contents.Set(&onesignal.StringMap{ En: onesignal.PtrString("sasdasdasd"), }) configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) appAuth := context.WithValue(context.Background(), onesignal.AppAuth, "api_key") resp, r, err := apiClient.DefaultApi.CreateNotification(appAuth).Notification(notification).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateNotification``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateNotification`: CreateNotificationSuccessResponse fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateNotification`: %v\n", resp) }
How can we help?
I create a notification as following. I received a success message but I don't see any message on the dashboard. Do i miss any field?
Code of Conduct