Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/200.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 未设置nullToken作用域。此请求没有所需的权限_Android_Token_Bucket - Fatal编程技术网

Android 未设置nullToken作用域。此请求没有所需的权限

Android 未设置nullToken作用域。此请求没有所需的权限,android,token,bucket,Android,Token,Bucket,在使用Autodesk的AndroidDK时,成功获取了令牌;但在创建Bucket时,意外返回“未设置nullToken作用域。此请求没有所需的权限。” 代码: HttpPost request = new HttpPost(BASEUrl+ upload_srv); request.addHeader("Content-Type", "application/json"); //v2 changed the param name from 'policy' to 'policyKey' St

在使用Autodesk的AndroidDK时,成功获取了令牌;但在创建Bucket时,意外返回“未设置nullToken作用域。此请求没有所需的权限。” 代码:

HttpPost request = new HttpPost(BASEUrl+ upload_srv);
request.addHeader("Content-Type", "application/json");

//v2 changed the param name from 'policy' to 'policyKey'
String jsonstr  ="{\"bucketKey\":\""+ newBucketName + "\", \"servicesAllowed\":{}, \"policyKey\":\"temporary\"}";
HttpEntity jsonent = new StringEntity(jsonstr,HTTP.UTF_8);
request.setEntity(jsonent);

HttpClient httpclient =  getNewHttpClient();
HttpContext localContext = new BasicHttpContext();

localContext.setAttribute(ClientContext.COOKIE_STORE, globalcookies);

HttpResponse response = httpclient.execute(request,localContext);