Grant Access to user throws an Exception

0 votes
 
 
Hi,
 
     1. After Uploading File for user. I tried to give Read Access to particular user. 
 
But it throws an Following Exception.
 
help me out to solve this???
 
Exception : com.shephertz.app42.paas.sdk.csharp.App42Exception: {"httpErrorCode":"400", "appErrorCode":"2207", "message":"BAD REQUEST", "details":"Session Id not valid"}
UnityEngine.Debug:Log(Object)
AssemblyCSharp.ResAccess:OnException(Exception) (at Assets/ResAccess.cs:20)
com.shephertz.app42.paas.sdk.csharp.connection.<execute>d__3:MoveNext()
com.shephertz.app42.paas.sdk.csharp.connection.<WaitForRequest>d__0:MoveNext()
 
2. Currently I am using WWWForm to get the url of uploaded file and read the file . Shows
this exception :
You are trying to load data from a www stream which had the following error when downloading.
403 Forbidden
UnityEngine.WWW:get_text()
 
Or
 Is that any other way to Read the bytes/ Use the data in the uploaded file (like .XML)
asked Apr 28, 2014 in App42 Cloud API-BaaS by raj (21 points)

1 Answer

+2 votes
 
Best answer

It looks like You are using ACL Enabled App,

If You are using ACL App then for making any request you must have to use SignUp(i.e UserService.CreateUser()), or LogIn(i.e UserService.Authenticate()), othewise you'll get this error.

Once you'll CreateUser OR AuthenticateUser, the sessionId of loggedIn user is Automatically setted in every request until you logged out the user by using UserService.LogOut().

For detailed info about  how to use ACL for your App, have a look on this :-

http://api.shephertz.com/tutorial/Securing-Your-App/?index=security-acl

&

Have a look on this upload sample for showing the downloaded files.

https://github.com/AkshayMShepHertz/App42-Unity3D-Upload

 

 

answered Apr 28, 2014 by Akshay.Mishra (179 points)
selected Apr 28, 2014 by raj
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...