1

first of all, i´ve searched for an existing topic but couldn´t find one.

Here´s my problem:

I´m working on a PDI (Pentaho Data Integration) Transformation, which should get data from the Google Search Console v3 API.

A URL which gets the Authentication Code from Oauth Playground is working. But the problem is that when I try to get the code with a HTTP Client Step in PDI, only a website gets returned. According to Google´s Doc. I should be able to get the code from the URL.

But you can´t 'log in' on the Google Account in PDI. When I change the URL to get the code offline without any prompt, i´m getting a: 'interaction_needed' error.

This is my actual URL:

https://accounts.google.com/o/oauth2/v2/auth
?scope=https://www.googleapis.com/auth/webmasters.readonly
&client_id={MY_CLIENT_ID}
&redirect_uri=https://developers.google.com/oauthplayground
&response_type=code
&access_type=offline

When I enter this URL into the Browser, im forced to select my google account and allow the access. After that the URL contains the needed Auth Code.

How could this be done in PDI?

Greetings and please help ;)

Woody
  • 23
  • 1
  • 8
  • can u try with http post component . I am using this component to get responseMessage and responsecode from URL. – karan arora Jul 13 '17 at 13:19
  • Receiving a 400 http code with the http post step, http client works with 200 code. Rest client replys a 302 code. – Woody Jul 13 '17 at 13:40

1 Answers1

0

Try using REST Client step in Pentaho. Also for using OAuth you will require to have a custom code to pass the authentication as a message body. Passing OAuth as a URL will not work.

I did a similar activity with fetching twitter feed using PDI where i have created a Javascript Step which includes codes developed by Paul Johnston (A JavaScript implementation of the Secure Hash Algorithm, SHA-1) - Gist Here.

Check this Blog: Fetching data from Twitter

Hope this will help :)

Rishu Shrivastava
  • 3,745
  • 1
  • 20
  • 41