Skip to content Skip to main navigation Skip to footer

Error 401: Request is missing required authentication credential

Full Error Message:
Error while creating new document. Error message: Error: 401. Error description: { “error”: { “code”: 401, “message”: “Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.”,”status”: “UNAUTHENTICATED” } }

You will see this this error if you try to generate a document without authorizing the app and granting access to your Google Drive. For example, if you just installed the app for the first time, recently upgraded the package, or made a major change to an Opero Documents process. See below for troubleshooting steps:

  1. Verify that this user is an assigned app user.
  2. Check sharing settings. The user also needs edit access to the google doc template in document action. See more detail about sharing permissions of google docs in this article . If you specified a google drive folder ID in document action, the user will also need edit access to the google drive folder.
  3. Refresh your app authorization with steps in this article.  If each user authorized the app with their own drive, any user getting this error would need to refresh authorization. Or you can use optional app feature to have only one Salesforce authorize the app and the google drive to force authorization over ALL app users to generate documents. See this article for more detail on this optional feature. If you need assistance, submit a case to support that specifies which user you would like the feature configured under. You will need to grant Opero support access to your org.