How to use oAuth2 Authorization in response file?
public function downloadExcel($fileName) {
ob_end_clean();
return response()->file(resource_path() . '/file_storage/exports/' . $fileName, ['header' => 'Authorization: Bearer ' . request()->bearerToken])->deleteFileAfterSend(true);
}
I am getting unauthorized when trying to download the Excel file. I put my api in in a group where a user is logged in.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire