title: Access google photos API via Java
body: <p>I am very new to google API and I am having troubles with it. I red documentation <a href="https://developers.google.com/photos/library/guides/get-started-java" rel="nofollow noreferrer">Google photos API for Java</a>, then I created OAuth credentials in google API console and downloaded it (credentials.json file).
  After that I tried to access google photos. Here is code from documentation:</p>
  
  <pre><code>// Set up the Photos Library Client that interacts with the API
  PhotosLibrarySettings settings =
     PhotosLibrarySettings.newBuilder()
    .setCredentialsProvider(
        FixedCredentialsProvider.create(/* Add credentials here. */)) 
    .build();
  
  try (PhotosLibraryClient photosLibraryClient =
      PhotosLibraryClient.initialize(settings)) {
  
    // Create a new Album  with at title
    Album createdAlbum = photosLibraryClient.createAlbum("My Album");
  
    // Get some properties from the album, such as its ID and product URL
    String id = album.getId();
    String url = album.getProductUrl();
  
   } catch (ApiException e) {
      // Error during album creation
   }
  </code></pre>
  
  <p>But I don't understand how to create <code>Credentials</code> object to pass it to the <code>FixedCredentialsProvider.create()</code> method</p>
  
  <p>Could you please provide me with some explanation/links about it?</p>