code: private String scopesToString(Auth.UrlCodex urlCodex) {
          if (scopes == null || scopes.length == 0) {
              return "";
          }
          StringBuilder sb = new StringBuilder();
          boolean needsSeparator = false;
          for (String scope : scopes) {
              if (needsSeparator) {
                  sb.append(scopeDelimiter);
              }
              needsSeparator = true;
  
              // Use the URL codex to encode each scope, if provided.
              sb.append(urlCodex == null ? scope : urlCodex.encode(scope));
          }
          return sb.toString();
      }
docs: Returns a comma-delimited list of scopes.
  <p/>
  <p>These scopes will be URL-encoded if the given codex is not null.</p>