Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7687631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:44:47+00:00 2026-05-31T19:44:47+00:00

I have built a GPS tracker that updates a homepage with its positions (and

  • 0

I have built a GPS tracker that updates a homepage with its positions (and webcam images).

How can I update a the current location of a google latitude user? A simple bash script invoking curl or a c-program would be nice!

Update: I also need to know how to do the authentication.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:44:48+00:00Added an answer on May 31, 2026 at 7:44 pm

    Is this what you’re looking for?

    In the API Console, be sure to request access to Latitude under the Services tab. This script will prompt for API Key, Client ID, Client Secret and then launch a browser for login (you may need to tweak that line for your system, see below). Once you’re logged in and grant access to your application, you’ll get a code you’ll paste in when prompted by the script. Then you’ll enter your lat/long/elev which will be posted to the service.

    #!/bin/sh
    
    LoginUrl="https://accounts.google.com/o/oauth2/auth"
    TokenUrl="https://accounts.google.com/o/oauth2/token"
    RedirectUri="urn:ietf:wg:oauth:2.0:oob"
    Scope="https://www.googleapis.com/auth/latitude.all.best https://www.googleapis.com/auth/latitude.all.city https://www.googleapis.com/auth/latitude.current.best https://www.googleapis.com/auth/latitude.current.city"
    CurlocUrl="https://www.googleapis.com/latitude/v1/currentLocation"
    
    read -s -p "Enter your API Key: " APIKey
    echo ""
    
    read -s -p "Enter your Client ID: " ClientId
    echo ""
    
    read -s -p "Enter your Client Secret: " ClientSecret
    echo ""
    
    # this next line may need to be tweaked in order to launch the browser
    open "${LoginUrl}?response_type=code&client_id=${ClientId}&redirect_uri=${RedirectUri}&scope=${Scope}"
    
    read -s -p "Log in, grant permission, enter the code: " Code
    echo ""
    
    resp=`curl -is "${TokenUrl}" -d "code=${Code}&client_id=${ClientId}&client_secret=${ClientSecret}&redirect_uri=${RedirectUri}&grant_type=authorization_code"`
    
    AccessToken=`echo "${resp}" | sed -e '/access_token/ !d; s/ *"access_token" *: *"\(.*\)",*/\1/'`
    TokenType=`echo "${resp}" | sed -e '/token_type/ !d; s/ *"token_type" *: *"\(.*\)",*/\1/'`
    ExpiresIn=`echo "${resp}" | sed -e '/expires_in/ !d; s/ *"expires_in" *: *"\(.*\)",*/\1/'`
    RefreshToken=`echo "${resp}" | sed -e '/refresh_token/ !d; s/ *"refresh_token" *: *"\(.*\)",*/\1/'`
    
    echo "Enter the location details." 
    read -p "Latitude in degrees (nn.nnnn): " latitude
    read -p "Longitude in degrees (nn.nnnn): " longitude
    read -p "Elevation in feed (nnnn): " altitude
    
    curl -is "${CurlocUrl}" -H "Content-Type: application/json" -H "Authorization: OAuth ${AccessToken}" -d "{ 'data': { 'kind': 'latitude#location', 'latitude': '${latitude}', 'longitude': '${longitude}', 'accuracy': 0, 'altitude': ${altitude} } }"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built an MSI that I would like to deploy, and update frequently.
I have looked at many open source GPS programs that can parse GPS data
I have a GPS tracker that a friend lent me. It's a chinese model,
I have built an application in C# that I would like to be optimized
InstaMapper is a GPS tracking service that updates the device's position more frequently when
i want to build an app for windows mobile that can get GPS locations(longitude
I have a java application that stores some GPS data in a strange format:
We have two systems with built in GPS today I spent a little time,
I have built a webpage, splashcreen.html , that when someone loads index.php will automatically
I have to build up a system which listens for requests from a GPS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.