Hi,
While doing device registration for push notification i am getting this error..
{"error":"unauthorized","timestamp":1470035549951,"duration":0,"error_description":"Subject does not have permission to access this resource","exception":"org.apache.usergrid.rest.exceptions.SecurityException"}
I am using
ApigeeClientResponse *response = [dataClient setDevicePushToken: deviceToken forNotifier: notifier];
Base Url is - https://amer-apibaas-prod.apigee.net/appservices/{org}/{app}/device
Please do let me know how to fix this issue.
Thanks
Solved! Go to Solution.
@Partha Sarathi Barik , Welcome to Apigee Community.
Looks like a permission issue for me. Make sure user role has permissions set for /devices or /device collection you are trying to access. You can set permissions to user role by navigating to BaaS UI, Users -> Roles in left side menu navigation bar. See example screenshot below,
Also, make sure user trying to access API is also added to above userrole. Keep us posted if any. For more details refer Apigee BaaS Docs.
@Partha Sarathi Barik , Welcome to Apigee Community.
Looks like a permission issue for me. Make sure user role has permissions set for /devices or /device collection you are trying to access. You can set permissions to user role by navigating to BaaS UI, Users -> Roles in left side menu navigation bar. See example screenshot below,
Also, make sure user trying to access API is also added to above userrole. Keep us posted if any. For more details refer Apigee BaaS Docs.
We are getting same error and we are using Guest Role (no user tagged) just org name and appname to register device. Getting same error even after setting permissions for guest role
We need to enable all permissions in Default role for Push Notifications to work.. Not sure what is going wrong. This is the permissions we have set..
Path | GET | POST | PUT | DELETE | |
/devices | yes | yes | yes | no | |
/devices/* | yes | yes | yes | no | |
/notifications | yes | yes | yes | no | |
/users | yes | yes | yes | no | |
/users/* | yes | yes | yes | no | |
/** | yes | yes | yes | yes |
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |