Skip to content

Commit

Permalink
Merge pull request #67 from notificationapi-com/8HTe7UBA/1679-doc-for…
Browse files Browse the repository at this point in the history
…-why-not-send-notification-from-front-end

Created faq
  • Loading branch information
devthedevel authored Jan 10, 2024
2 parents 510cc49 + 031e78e commit dbc57d6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/reference/js-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,3 +374,11 @@ notificationapi.showUserPreferences();
| id\* | string | The unique ID of the user in your system. |
| email | string | The email of the user. |
| phone | string | The phone number of the user. Expected format: +15554443333. |

## Frequently Asked Questions (FAQ)

### Why Can I Not Send Notifications from a Front-end SDK?

NotificationAPI back-end SDKs require your `clientId` and `clientSecret` keys that are unique to your account. If anyone else obtained your keys then they would be able to edit or delete your notifications, and be able to send requests to NotificationAPI from your account. This is a security risk to you and your clients.

To better protect you, the NotificationAPI front-end SDKs do not allow _sending_ notifications: they only allow _receiving_ notifications. If you require sending notifications from your front-end, it is recommended to use a NotificationAPI back-end SDK on your back-end and expose an API for your front-end.

0 comments on commit dbc57d6

Please sign in to comment.