当我调用 Graph/assigments
端点时,我收到带有以下消息的错误请求:
未找到段“分配”的资源。
相同的代码模式适用于其他端点,例如/teachers
and /members
,只是不适用/assignments
。
代码:
$getEventsUrlAssignments = '/education/classes/' . $class->getId() . '/assignments';
try {
$assignments = $graph->createRequest('GET', $getEventsUrlAssignments)
->setReturnType(Model\EducationAssignment::class)
->execute();
}
catch (\GuzzleHttp\Exception\ClientException $e) {
dd($e->getResponse()->getBody()->getContents());
}
我添加了文档中描述的正确权限:
EduAssignments.ReadBasic
EduAssignments.ReadWriteBasic
EduAssignments.Read
EduAssignments.ReadWrite
我可能做错了什么?