Hi Vinny!

First, thank you for the response and speed.

Before yesterday I was testing with this API, but I didn't know how to set 
the atribute key={YOUR_API_KEY} (I also tried via GET and INSERT, but I had 
the same problem).

This was the request by placing the user to remove:

DELETE https:
//www.googleapis.com/admin/directory/v1/users/userToDelete%40subdomain.domain.com?key={YOUR_API_KEY}

Authorization: Bearer ya29.AHES6ZQuy4IbEav9NJf79MBXVEwxxxxxxxxxxxx-yyyyyyy
X-JavaScript-User-Agent: Google APIs Explorer

And this the error with which it responded:

403 Forbidden
 
- Show headers -
  
{
  "error": {
   "errors": [
    {
     "domain": "global",
     "reason": "domainCannotUseApis"
     "message": "Domain can not use apis."
    }
   ]
   "code": 403,
   "message": "Domain can not use apis."
  }
}

How would define in these examples my api_key?

Previously, I turned on the Admin SDK in:

https://code.google.com/apis/console/ # project: XXXXXXXXXX: services

and

https://cloud.google.com/console # / project / XXXXXXXXXX / apiui / api? 
show = all

Thank you very much in advance and best regards,

Gonz



El miércoles, 11 de septiembre de 2013 01:10:57 UTC+2, Vinny P escribió:
>
> On Tue, Sep 10, 2013 at 10:34 AM, Gonzalo Zamarro <
> [email protected] <javascript:>> wrote:
>
>> I'm trying to access google admin-directory  API to create, delete or 
>> remove users as administrator.
>> I'm trying to develop an application that allows to update or delete a 
>> user.
>>
>> In the first way, I used the code shown: 
>> http://stackoverflow.com/questions/16729165/google-admin-directory-api-is-returning-400-bad-request
>>
>> How can I fix the error that occurs in the first case?
>>
>
>
> There are a number of issues that could go wrong here.
>
> First, you may want to double check that the account you're using has the 
> proper authorizations: use the APIs Explorer to test out operations: 
> https://developers.google.com/admin-sdk/directory/v1/reference/users/delete#try-it
>  
>
> If that works, try using the REST API directly and see if you can 
> authorize properly: 
> https://developers.google.com/admin-sdk/directory/v1/reference/
>
>  
>  
> -----------------
> -Vinny P
> Technology & Media Advisor
> Chicago, IL
>
> App Engine Code Samples: http://www.learntogoogleit.com
>   
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to