0

I try to create activity through the form 'Google+ Domains API v1' with 'plusDomains.activities.insert'

I use scopes :

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.

Dharman
  • 30,962
  • 25
  • 85
  • 135
YoanP.
  • 9
  • 2

1 Answers1

0

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:

"Requires authorization"

To prove this, give the Try-it a go. It uses OAuth2. Your request should work.

ReyAnthonyRenacia
  • 17,219
  • 5
  • 37
  • 56
  • Hi, as you can see [HERE](https://ibb.co/nHYa76) I use OAuth2. But I try you're link and I have the same error. An other idea ? – YoanP. Dec 26 '17 at 15:44