This is an undocumented, beta API used by the Google Music client for Android. Most of the URIs you see here were extracted from the Android .apk file. Overall, it works just like any other GData API.
A few notes:
First we need to go through the ClientLogin process to get our auth token. This process is documented fairly thoroughly in Google's API documentation and we can copy their sample requests exactly, aside from the value of the service parameter.
Using cURL, I was able to get an auth token with the following command:
curl -d accountType=GOOGLE \ -d Emailfirstname.lastname@example.org \ -d Passwd=north23AZ \ -d service=sj \ https://www.google.com/accounts/ClientLogin
The response should contain 3 values, SID, LSID, and Auth. Copy the Auth value, and ignore the other two.
Now we have the auth token, we can make a request. We're going to request the track list.
According to the URIs from the Android client, that request URL
We can make a request there, specifying the auth token as a header in our request:
curl --header "Authorization: GoogleLogin auth=YOUR_AUTH_TOKEN" \ https://www.googleapis.com/sj/v1beta1/tracks
If everything is successful, you should get back a JSON response containing all of the metadata for all of your tracks.
These are other API requests that were found in the Android client.
Once we have the song ID of a track, we can request that track's
audio stream as an MP3 file. This is actually a 2-part request,
we need to request the URL of the stream, and then the stream
Unfortunately, you need to have sync'ed your Google account with an Android device in order for this part to work.
Android makes requests to
https://android.clients.google.com/music/mplay with the following parameters.
Note: This might return HTTP redirects before eventually giving you the audio stream. Make sure you are prepared to handle redirects!
e(requesting for explicit playback) and
There is also an important HTTP header that must be sent with
this request, in addition to the GoogleLogin header.
You must include X-Device-ID with the value of your Android device's ID. The device must be linked to your Google account. Failure to include this header will result in HTTP status 400. If you don't have an Android device, you can run one in the Android emulator (included with the Android SDK), and set up your Google account to sync. Then you can use the device ID of the emulated device to request your music.