You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to send notification with ExternalId.
I do not receive anything.
But when the external Id is null, i receive the notification on my device.
public async Task SendNewMatchNotification(string userId)
{
//SendOneSignalNotification
Configuration config = new Configuration();
config.BasePath = _options.BasePath;
// Configure Bearer token for authorization: app_key
config.AccessToken = _options.AccessToken;
var apiInstance = new DefaultApi(config);
var notification = new Notification(appId: _options.AppId)
{
TemplateId = _options.NewMatchTemplateId,
IncludedSegments = new List<string> { "Total Subscriptions" },
ExternalId = userId
};
try
{
// Create notification
CreateNotificationSuccessResponse result = await apiInstance.CreateNotificationAsync(notification);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DefaultApi.CreateNotification: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
On my .Net MAUI APP i'm using OneSignal.Login(userId.ToString()); to register the connected user.
But in my subscriptions i have two with the same Id's (it's maybe the problem)
Any idea of what's the problem ?
Steps to reproduce?
### Steps to reproduce?
Back end API .Net 7
pckg OneSignalAPI v2.0.2
Client : MAUI .Net 7.0
pckg OneSignal.SDK.Net 5.0.2
What did you expect to happen?
What did you expect to happen?
I expect to receive notification when using externalId
Relevant log output
Output of the one signal api :
class CreateNotificationSuccessResponse {
Id: 4cead680-2811-4134-b570-4f4d1bd95acc
Recipients: 0
ExternalId: 91b0045a-ed5c-49df-b499-88d382721db4
Errors:
}
Relevant log output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
@Duddde
According to OneSignal Support, I need to use the IncludeExternalUserIds property instead of ExternalId. Indeed it seems to work. However, the IncludeExternalUserIds property is marked as deprecated by the SDK.
Do you think this is the right solution?
The API return does not looks good...
class CreateNotificationSuccessResponse {
Id: 9481f102-ae46-4bfa-907e-fa8949a00aed
Recipients: 0
ExternalId:
Errors:
}
@Duddde
What happened?
I'm trying to send notification with ExternalId.
I do not receive anything.
But when the external Id is null, i receive the notification on my device.
On my .Net MAUI APP i'm using
OneSignal.Login(userId.ToString());
to register the connected user.But in my subscriptions i have two with the same Id's (it's maybe the problem)
Any idea of what's the problem ?
Steps to reproduce?
### Steps to reproduce? Back end API .Net 7 pckg OneSignalAPI v2.0.2 Client : MAUI .Net 7.0 pckg OneSignal.SDK.Net 5.0.2
What did you expect to happen?
What did you expect to happen?
I expect to receive notification when using externalId
Relevant log output
Output of the one signal api : class CreateNotificationSuccessResponse { Id: 4cead680-2811-4134-b570-4f4d1bd95acc Recipients: 0 ExternalId: 91b0045a-ed5c-49df-b499-88d382721db4 Errors: }
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: