question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[expo-server-sdk] Insufficient permissions to send push notifications to...

See original GitHub issue

Summary

I generated a new access token and toggled it on for push notifications. But when I try to use access token in my Expo constructor from expo-server-sdk. I get this error Insufficient permissions to send push notifications to <slug>

When I turn off the push notifications toggle (basically not requiring an access token) then it works.

Currently using expo-server-sdk 3.6.0

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

Android, iOS

SDK Version (managed workflow only)

43

Environment

expo-env-info 1.0.2 environment info: System: OS: macOS 11.6.5 Shell: 3.2.57 - /bin/bash Binaries: Node: 14.4.0 - /usr/local/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 7.19.0 - /usr/local/bin/npm SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 IDEs: Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild npmPackages: expo: ^43.0.0 => 43.0.1 react: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 Expo Workflow: managed

Reproducible demo

Basically just creating the client with an access token and using it to call sendPushNotificationsAsync()

let expo = new Expo({ accessToken: process.env.EXPO_ACCESS_TOKEN }) … await expo.sendPushNotificationsAsync(chunk)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
venkateshreddy5353commented, Sep 14, 2022

@brentvatne Thanks for quick reply, security is disabled. image

and this is happening only with particular user in the organization, who is also the owner of the organization.

Update: it is solved, it was enabled in that particular account.

0reactions
brentvatnecommented, Sep 14, 2022

@venkateshreddy5353 - have you enabled push token security? if so you need to provide an access token. https://docs.expo.dev/push-notifications/sending-notifications/#additional-security

image
Read more comments on GitHub >

github_iconTop Results From Across the Web

Push Notifications Setup - Expo Documentation
The user's permission to send them push notifications · The user's ExpoPushToken- if push notifications are mail, then the ExpoPushToken is the user's...
Read more >
Error while trying to send push notifications - Stack Overflow
Now I can't send notifications from my own backend using expo-server-sdk or expo notifications push tool. Error I get is the following:
Read more >
React Native Push Notifications - DEV Community ‍ ‍
In this tutorial, you will learn: How to display a local notification when the app is both in background and foreground. How to...
Read more >
Community.Expo.Server.SDK 1.2.1.1 - NuGet
community-expo-push-notification-server-sdk. Installation. Install package through NuGet - Community.Expo.Server.SDK. To send requests without access token ...
Read more >
Fix notification issues in the Teams Android app
Make sure that permissions for Teams are enabled: Open the Settings app. ... This third-party app might be blocking Teams from sending notifications....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found