user3037695
user3037695

Reputation: 1

Getting 403:Forbidden posting to my timeline

I have enabled mirror API for my project in developer console. I authorized mirror API and generated an access token in the OAuth playground. Building a request in playground or sending it manually I always get 403 error. Can anyone help?

wget --header="Authorization: Bearer access-token" --header="Content-Type: application/json" --post-data="{ \"text\": \"Hello world\" }" https://www.googleapis.com/mirror/v1/timeline --2014-02-07 00:35:00-- https://www.googleapis.com/mirror/v1/timeline Resolving www.googleapis.com (www.googleapis.com)... 74.125.129.95, 2607:f8b0:400e:c04::5f Connecting to www.googleapis.com (www.googleapis.com)|74.125.129.95|:443... connected. HTTP request sent, awaiting response... 403 Forbidden 2014-02-07 00:35:00 ERROR 403: Forbidden.

Upvotes: 0

Views: 220

Answers (1)

Devrim
Devrim

Reputation: 15533

1) Building a request in playground

On Glass Playground site there is a red button named Show Playground usage information at the bottom.

If you click that button you'll see the To give the Playground access to a timeline information.

To give the Playground access to a timeline:

  1. Create a Google APIs project client ID.
  2. Add https://mirror-api-playground.appspot.com to the list of authorized JavaScript origins for the client ID enter image description here
  3. Copy your client ID to the Playground and start interacting with your timeline. enter image description here

2) Building a request programmatically

If you have 403: Forbidden error while sending TimelineItems programmatically, that's probably because you are not using the correct values of your clientId and clientSecret.

Edit: Three items are copied from Glass Playground site(under the red button).

Upvotes: 1

Related Questions