[expo-server-sdk] Insufficient permissions to send push notifications to...
See original GitHub issueSummary
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:
- Created a year ago
- Comments:5 (3 by maintainers)
@brentvatne Thanks for quick reply, security is disabled.
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.
@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