How to configure GET method by REST API to get message content from GMAIL?

 

We need to obtain information from Gmail, for this we have used the GET option of the Bonita REST API. We have located the data provided by the Google API (Client ID and Secret Key). When we run the test from the Bonita interface, it throws us the following error:

java.lang.reflect.InvocationTargetException org.bonitasoft.engine.bpm.connector.ConnectorExecutionException: USERNAME = install | org.bonitasoft.engine.core.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: org.bonitasoft.engine.commons.exceptions.SBonitaRuntimeException: org.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft. engine.connector.ConnectorException: org.bonitasoft.engine.connector.ConnectorException: [GET] https://gmail.googleapis.com/gmail/v1/users/mail_test@gmail.com/messages response status is not successful: 401 - Unauthorized

Are we missing some configuration that we are ignoring?