{
HttpClient client = new HttpClient();
PostMethod method = new PostMethod(ConsumerScopesRegistrationURL);
Base64 base64 = new Base64();
String base64Credentials = new String(base64.encode("admin:admin".getBytes()));
method.addRequestHeader(new Header("Authorization", "Basic " + base64Credentials));
method.addParameter(OAuth.OAUTH_CONSUMER_KEY, consumerKey);
method.addParameter("xoauth_scope", scope);
method.addParameter("xoauth_permission", "sendMessages");
int status = client.executeMethod(method);
if (HttpResponseCodes.SC_OK != status) {