Google API v4表格setSubject未经授权的客户端

I'm using the Google API v4 in a Laravel project to write to Google Sheets. I am able to create sheets and share them with a particular user, but I wish to use the setSubject() method to impersonate a user so sharing is not necessary.

I have Domain wide Delegation set up but I am receiving this error:

[Google_Service_Exception]
{
  "error": "unauthorized_client",
  "error_description": "Unauthorized client or scope in request."
}

I needed to configure the scope for domain-wide-delegation as per this comment on GitHub following these steps.