I want to upload a csv file to fusion table using curl. I created client id and secret using developer console. Then I generated access token using google playground link.
using the generated access token, I could successfully import data in fusion table from csv file.
Now, the problem is that the access token expired after some time and I have to get new access token using refresh token. This I want to do also using curl, but I get 'unauthorized_client' error while refreshing the access token.
following are the commands used by me.
to upload data in fusion table
curl -s -S --data-binary "INPUT_CSV_FILE" -H "Authorization: Bearer ACCESS_TOKEN_FROM_PLAYGROUNDLINK " -H "Content-Type: application/octet-stream" "https://www.googleapis.com/upload/fusiontables/v1/tables/FUSION_TABLE_ID/import"
Refresh token
curl https://www.googleapis.com/oauth2/v3/token -d "grant_type=refresh_token&refresh_token=REFRESH_TOKEN(from playground)&client_id=CLIENT_ID&client_secret=CLIENT_SECRET" -X POST
-A "Mozilla"
into your cmd-line, before the-d ..
Good luck. – shellter{}
tool at top left of edit box after selecting text to give it the correct "code" format. Glad you found a solution. Good luck. – shellter