As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
Hey,
I'm new to the Kinvey SDK. I have uploaded an image to the files collection with one user, and now i'm trying to download it with another user.
I've used "KCSFileStore.uploadData" to upload the image and saved the fileId when the uploade completes.
When i try to download the file using KCSFileStore.downloadFile(idOrIds, ... ) i get the error:
Domain=KCSResourceErrorDomain Code=401 "Error downloading file"
"The credentials used to authenticate this request are not authorized to run this operation. Please retry your request with appropriate credentials"
I use createAutogeneratedUser to get a user, like this:
if KCSUser.activeUser() == nil {
KCSUser.createAutogeneratedUser(
nil,
completion: { (user: KCSUser!, errorOrNil: NSError!, result: KCSUserActionResult) -> Void in
print("Got new User ID: \(user.userId)")
}
)
I'm uploading and downloading form two different iOS apps running on the same app key and secret.
Should I generate a user with specific file read options? Could you guide me to some documentation regarding this?
Hi,
You are getting this error because second user does not have permission to access that file.
There are two solutions around this:
Let me know if you have any questions about this.
Regards,
Wani
Kinvey Support
Awesome, that did the trick (along with turning App Transport Security Settings to NSAllowsArbitraryLoads).
Thank you :)
Martin Wiingaard
Hey,
I'm new to the Kinvey SDK. I have uploaded an image to the files collection with one user, and now i'm trying to download it with another user.
I've used "KCSFileStore.uploadData" to upload the image and saved the fileId when the uploade completes.
When i try to download the file using KCSFileStore.downloadFile(idOrIds, ... ) i get the error:
Domain=KCSResourceErrorDomain Code=401 "Error downloading file"
"The credentials used to authenticate this request are not authorized to run this operation. Please retry your request with appropriate credentials"
I use createAutogeneratedUser to get a user, like this:
if KCSUser.activeUser() == nil {
KCSUser.createAutogeneratedUser(
nil,
completion: { (user: KCSUser!, errorOrNil: NSError!, result: KCSUserActionResult) -> Void in
print("Got new User ID: \(user.userId)")
}
)
}
I'm uploading and downloading form two different iOS apps running on the same app key and secret.
Should I generate a user with specific file read options? Could you guide me to some documentation regarding this?
Hi,
You are getting this error because second user does not have permission to access that file.
There are two solutions around this:
Documentation about ACL structure is available here: http://devcenter.kinvey.com/rest/guides/security#entityanduserpermissionsLet me know if you have any questions about this.
Regards,
Wani
Kinvey Support
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstWani
Hi,
You are getting this error because second user does not have permission to access that file.
There are two solutions around this:
Documentation about ACL structure is available here: http://devcenter.kinvey.com/rest/guides/security#entityanduserpermissionsLet me know if you have any questions about this.
Regards,
Wani
Kinvey Support
Martin Wiingaard
Awesome, that did the trick (along with turning App Transport Security Settings to NSAllowsArbitraryLoads).
Thank you :)
-
Why do I get "Undefined symbols" errors when building with KinveyKit?
-
How do I register push tokens?
-
When using social login, to perform a log-out, do I need to log out of the social network, Kinvey, o
-
How can I assign additional properties to users?
-
Does KinveyKit support 64-bit ARM devices, such as iPhone 5s?
-
Authorization Token Invalid or Expired
-
BOOL and how it is stored in the database.
-
Offline saving throwing errors
-
Custom endpoint not able to form request object
-
Security through business logic
See all 437 topics