Mar 15, 2018

OAuth 2.0 scope information for the Google Blogger API

The scope can be set to either of the following depending on whether to want read or write access to blogs.
  1. https://www.googleapis.com/auth/blogger
  2. https://www.googleapis.com/auth/blogger.readonly
Or

import com.google.api.services.blogger.BloggerScopes;

BloggerScopes.BLOGGER
BloggerScopes.BLOGGER_READONLY

return the above corresponding strings.

List<String> scopes = Arrays.asList(BloggerScopes.BLOGGER);
    // set up authorization code flow
  GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(
     httpTransport, jsonFactory, clientSecrets, scopes).build();
// set up authorization code flow
    GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(
        httpTransport, JSON_FACTORY, clientSecrets,
        Collections.singleton(BloggerScopes.BLOGGER_READONLY)).setDataStoreFactory(
        dataStoreFactory).build();