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 left remaining below fields empty in the google calendar connecter.
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":"testmail@email.com"
}
]
}
I'm using anypoint studio 7.8.0.
Thanks in advance.
You need to start the OAuth dance first, to get the access token.
You can start it by hitting the Authorize path
that you have configured in your app, which in your case is http://localhost:8081/authorize
After that you will be redirected to Google sign in page. If the Google oauth credentials are configured correctly the mule app will get the access token and use it for the future requests.