0

When I try to list albums with the PhotosLibraryService API, I always return null, has anyone been able to use the new Google Photos API yet? The picasa API no longer works.

public void ListAlbums()
    {
        var json = File.ReadAllText(_diretorio + "/PhotoClient/" + "client.json");
        var cr = JsonConvert.DeserializeObject<PersonalServiceAccountCred>(json);

        var xCred = new ServiceAccountCredential(new ServiceAccountCredential.Initializer(cr.client_email)
        {
            Scopes = this._scopes
        }.FromPrivateKey(cr.private_key));

        // Create the service.
        var service = new PhotosLibraryService(new Google.Apis.Services.BaseClientService.Initializer()
        {
            HttpClientInitializer = xCred
        });

        var albums = service.Albums.List().Execute();
    }

enter image description here

Thanks!

Samuel
  • 154
  • 2
  • 13

0 Answers0