I try to create activity through the form 'Google+ Domains API v1' with 'plusDomains.activities.insert'
I use scopes :
- https://www.googleapis.com/auth/plus.login
- https://www.googleapis.com/auth/plus.me
- https://www.googleapis.com/auth/plus.stream.write
Request is : https://www.googleapis.com/plusDomains/v1/people/me/activities?preview=true&fields=access&key={YOUR_API_KEY}
parameters :
{
"object": {
"originalContent": "Test"
},
"access": {
"items": [
{
"type": "domain"
}
],
"domainRestricted": true
}
}
but I have the following error :
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Forbidden"
}
],
"code": 403,
"message": "Forbidden"
}
and I have this message :
You do not have permission to execute this method.
This API call requires OAUTH2.0 authorization not an API key. That's the reason you're getting the error.
It's clearly stated in Activities.insert:
To prove this, give the Try-it a go. It uses OAuth2. Your request should work.