Reported by @tidal fog
Bug Report: You have insufficient permissions for this operation. Missing scopes: api.threads.write.
`Steps to Reproduce`
I'm using openai-php/client (0.10.3) and since friday/saturday I'm getting a weird error.
$this->openAIAssistantService->getClient()->threads()->create([
"metadata" => [
"type" => "PromptMindAI",
"version" => "1.0",
"threadBoxId" => strval($threadBox->getId())
]
]);
=> My API Key have full permissions.
=> Testing the same action multiple times will succeed at some points.
`Expected Result`
No permission error
`Actual Result`
You have insufficient permissions for this operation. Missing scopes: api.threads.write. Check that you have the correct role in your organization (Reader, Writer, Owner) and project (Member, Owner), and if you're using a restricted API key, that it has the necessary scopes.
`Environment`
PHP 8.1 / Symfony 6.2