froge model conversion svf format encountered problems, always prompted that token did not provide, I have provided
in headertoken = request.GET.get("token",None)
urn = request.GET.get("urn",None)
safebase64urn = base64.b64encode(urn)
PostUrl = "https://developer.api.autodesk.com/modelderivative/v2/designdata/job"
postData={
"input":{
"urn":safebase64urn
},
"output":{
"formats":[
{
"type":"svf",
"views":[
"2d",
"3d"
]
}
]
}
}
headers = {"Authorization":"Bearer "+token,"Content-Type":"application/json"}
print "--token---",headers
resp = requests.post(PostUrl,postData,headers)
print("HTTP {}\n{}\n\n{}".format(resp.status_code, resp.headers, resp.text))
error message
HTTP 401
{"Content-Length": "37", "Access-Control-Allow-Headers": "Session-Id,Content-Len
gth,Accept-Encoding,x-ads-acm-check-groups,Content-Encoding,x-ads-acm-namespace,
Content-Type,If-Modified-Since,Range,Accept,x-ads-acm-groups,Content-Range,x-req
uested-with,Expect,Access-Control-Allow-Credentials,If-None-Match,Access-Control
-Allow-Origin,x-csrf-token,x-ads-test,Authorization,If-Match,x-ads-force, x-ads-
force-all", "Connection": "keep-alive", "Access-Control-Allow-Credentials": "tru
e", "Date": "Thu, 30 Aug 2018 03:07:56 GMT", "Access-Control-Allow-Origin": "",
"Access-Control-Allow-Methods": "POST,GET,OPTIONS,HEAD,PUT,DELETE,PATCH", "Conte
nt-Type": "text/plain"}
Token is not provided in the request.