FAQ
What should I do if I receive a 403 error message, such as"You are not authorized to do this operation"or" You are not authorized to perform this action ", when calling a QuanMiao Light App API operation?
This error occurs because the current account does not have permission to access QuanMiao Light App API operations. Try one of the following solutions:
-
Use your Alibaba Cloud account in the RAM console to grant the
AliyunQuanMiaoLightAppFullAccesssystem policy to your RAM user or RAM role. For more information, see Manage permissions for RAM users or Manage permissions for RAM roles.NoteYou can also grant the permission by calling the Add permissions for a specified user API operation.
-
Grant the RAM user or RAM role permissions for the Model Studio workspace. For more information, see Grant Model Studio workspace permissions to a RAM user or Grant workspace permissions to a RAM role.
-
Check that the workspaceId value is correct. Enter the ID of the workspace to which your RAM user or RAM role belongs. In the Model Studio console, open the Workspace details dialog box and obtain parameter values such as the workspace ID (for example,
ws_cpgCvmBeG...) and agentKey. Then, enter the workspace ID in the.workspaceId()parameter of your API call code.
What should I do if I receive the error "Error: Invalidcontents code: 400,httpStatusCode: 200" when calling a QuanMiao Light App API for a conversation with history?This error occurs when you call a QuanMiao Light App with conversation history. Although the HTTP status code of the API is 200 and the outer code field is successful, the status field in the business data data is FAILED and the errorMessage field is No content found, indicating that the QuanMiao Light App did not find valid conversation content when processing the request. The following is an example of the response body:
{
"code": "successful",
"data": {
"errorMessage": "No content found",
"results": [],
"status": "FAILED"
},
"httpStatusCode": "200",
"message": "successful",
"requestId": "52676CAF-54AA-50D9-85F6-F6AE5383661A",
"success": true
}
We recommend that you check the following:
- Check whether the conversation content (
contents) passed in is empty or incorrectly formatted. - Verify that the context data of the conversation history is complete and has not expired.
- If the issue persists after troubleshooting, submit a ticket with the
requestIdfrom the response body and contact technical support for further assistance.