I'm getting below error when trying to create a google event from anypoint studio using google connector.
OAuth authorization dance not yet performed for resourceOwnerId null
Basically to test this functionality, I did below
- I took a listener connector (path:/hello) and configured with local host 8081
- Dragged google calendar event insert connector and configured with below details
- Base url: https://www.googleapis.com/calendar/v3
- consumer secret : Entered corporate clent id
- Consumer secret:Entered secret key
- Authorization url : https://accounts.google.com/o/oauth2/auth
- Access token url : https://accounts.google.com/o/oauth2/token
- Scopes: https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/calendar.events https://www.googleapis.com/auth/calendar.events.readonly https://www.googleapis.com/auth/calendar.readonly https://www.googleapis.com/auth/calendar.settings.readonly
- Call back path : /oauth2callback
- Authorize path : /authorize
- external callback url : http://localhost:8081/oauth2callback
I left remaining below fields empty in the google calendar connecter.
- Resource Owner id
- Before
- after
- Object store
In between, HTTP Listener and Google calendar events Insert connecter, I placed Transform message and written below Dataweave
%dw 2.0
output application/json
---
{
summary: payload.summary,
start: {
dateTime: payload.start.dateTime,
timeZone: payload.start.timeZone
},
end: {
dateTime: payload.end.dateTime,
timeZone: payload.end.timeZone
}
}
Below is the JSON input I'm giving from the postman, url being http://localhost:8081/hello
{
"end": {
"datetime": "2022-05-19T16:00:00+05:30",
"timezone":Asia/Chennai
},
"start": {
"datetime": "2022-05-19T14:00:00+05:30",
"timezone":Asia/Chennai
},
"summary":"First PO from Mulesoft Google connector",
"description":"First desc from Mulesoft Google connector",
"location":"Hyderabad",
"attendees":[
{
"email":"[email protected]"
}
]
}
I'm using anypoint studio 7.8.0.
Thanks in advance.