Google Apps Directory API - Change primary domain with secondary domain - google-apps

I have a Google Apps Free Account with one primary domain and an secondary domain.
Recently I came across Google Admin SDK Directory API, where the option to switch the primary domains is available through the API.
Directory API - Customer Update
I used the "Try Now" section to use the API, I did log in and I authorized with appropriate scopes and provided following properties,
customerKey - my_customer
in Request Body
{"customerDomain":"domainB.com"}
but got following response,
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Invalid Input"
}
],
"code": 400,
"message": "Invalid Input"
}
}
Any idea on this ?

Google Apps Free / Standard Edition does not support secondary domains and thus does not support change of primary / secondary domain.
Additionally, primary domain change does not work if you registered the domain with Google, you'll need to transfer to a different domain registrar first.
See Google's help article for other considerations.

Related

Facebook Server-Side API (Marketing API)

First of all - sorry for my english, not my primary language.
We are trying to send some Pixel events from server (not from user browser), so we have an instructions from facebook: https://developers.facebook.com/docs/marketing-api/server-side-api
But stuck on step "Create Access Token", this section (Server-Side API for Web) is missing in Pixel's settings.
Also when we trying to make request to graph api to send some events we getting this error:
{
"error": {
"message": "(#3) This pixel is not enabled for this capability: SERVER_SIDE_EVENTS_CORE_FUNCTIONALITY",
"type": "OAuthException",
"code": 3,
"fbtrace_id": "AEWB5WGs0g_e21p2Qd1kZsX"
}
}
Is anyone managed to resolve this issue?
Mindesik,
At least before you had to be whitelisted (approved by FB) to be able to use server-side API from FB. It's usually not explicitly mentioned on the FB dev portal. If you have an FB representative for your business, try to ask them. Looking at the docs it looks quite promising, so the things might have changed.
Still, in case you've followed all the steps correctly and still getting this error this is most probably whitelisting issue that is implicitly required. The problem here is that to make FB aware of users associated with the events you send you have to send Personally identifiable information (PII) which would be a subject of strict compliance according to local laws in the EU and the US.
Here is what is says to me about debugging S2S events:

Office 365 REST Access to OData is disabled

I've been trying to connect to Office 365 REST Api to fetch user- and room calendar data. I'm able to obtain access tokens and all that, but every time I make a query I get the same response:
{
"error": {
"code": "ErrorAccessDenied",
"message": "Access to OData is disabled."
}
}
I get the same reply from the oauth playground as well (https://oauthplay.azurewebsites.net/).
I'm aware that in order to access resource calendar data I need to create a service app with a generated certificate (as described here: http://blogs.msdn.com/b/exchangedev/archive/2015/01/22/building-demon-or-service-apps-with-office-365-mail-calendar-and-contacts-apis-oauth2-client-credential-flow.aspx).
But since I cannot get event the basic information to flow, I guess there's something wrong with the office365 setup?
Thanks for your help!

product catalog api fail

need help.
I tried to start with https://developers.facebook.com/docs/marketing-api/dynamic-product-ads/ads-management/v2.3
created account. Approved it by phone.
created a business account, an ad account, an app, and so on.
linked app to ad accont like this https://developers.facebook.com/docs/marketing-api/access#standard_accounts.
Now i tried to create product catalog. i am getting same error all the time:
The app is not whitelisted to use this API
i tried to call api to cteate/list/managment product catalog.
when i did, the same by UI - i can create product catalog & feed.
but by API - all time error.
i do not understand what it need?
now try to create product set:
GET /<product_catalog ID>/product_sets/?
access_token=<my access token from app with full rights get from exploer>
{
"error": {
"message": "(#200) The app is not whitelisted to use this API",
"type": "OAuthException",
"code": 200
}
}
try to create the same:
POST : /v2.3/<product_catalog ID>/product_sets/?access_token=<my access token from app with full rights get from exploer>&name=my new prod set
{
"error": {
"message": "(#275) Ad account cannot be determined for this request",
"type": "OAuthException",
"code": 275
}
}
So what Are the changes i needed to make it work?
is it any way to made api calls work correctly?
p.s.
i guess something wrong in settings - i run unit tests in SDK - have the same situation. i have read about that problems with game app - but my app - is not a game, so i cant use solution in my situation.
if some body understand what whitelist API want - please help!
Thanks.
Hopefully this helps someone else: I was also trying to create a Product Catalog via the API in Development, and got "The app is not whitelisted to use this API".
I solved it by creating an admin system user, and generating an access token with the business_management permission.
The error is explained by the documentation you linked to - unless your app is approved for Standard access to the API it can only access a specific number of ad accounts and those accounts need to be pre-configured in the app settings
Many of the business manager APIs can't be used because they're not tied to one of those pre-specified accounts (hence the Ad account cannot be determined for this request error).
In general, the business manager APIs likely won't work for you until your app has access at the standard level, though some will if they're account-specific
You can't be an app admin and a tester/developer at the same time. You should create another facebook account for tests.
This happens also when the access token used is not from your app which has Standard Access. Also, note the dev version of the same app will not work.

getting started with google directory API and device management

Heyy, I was looking into Google apps for business and playing with the API explorer ... I have a reseller account with google let's say stack#reseller.goteam.com and this works for creating users, org units, subscriptions and so.
I want to start with the device management and investigating on these things:
1) How do I know my customerId from google cpanel ... I am looking to know how to see the info required for these requests in CPanel.
2) I am getting the below error:
400 Bad Request
- Show headers -
{
"error": {
"errors": [
{
"domain": "global",
"reason": "badRequest",
"message": "Bad Request"
}
],
"code": 400,
"message": "Bad Request"
}
}
In my request, I entered "goteam.com" as customerId..... Isn't this correct? any good posts on getting started with device management.... Please help
there are 2 basic ways to determine what customerId you need to use:
Just use my_customer, this will use the customerId of the user you authenticated as. This works perfect when working with your own domain but will not work when when you are a reseller trying to access one of your customer's domain data.
Use the users.list() API call to determine the customerId. Specify the domain, a maxResult of 1 and that the only field you want back is customerId. Here's what it'd look like in the API Explorer.
The customerId is not your domain, it's a unique ID that looks like random characters.
Lastly, you should be aware that resellers currently can't make device management requests for customers (see note near top).
I agree with Jay. Currently resellers cannot utilize the Directory API on behalf of their customers. The Provisioning API does however, work.

What are the possible causes for Facebook's "Error validating application"?

My application uses Facebook's Graph API to pull user's information via /me, /wall, and so forth.
Sometimes users run into the error:
"error": {
"message": "Error validating application.",
"type": "OAuthException",
"code": 190
}
I can't find any reasons why this might be triggered as:
Access token is valid, never-expires, and is associated to my
application.
I got the permissions to do the API calls
API calls works fine afterward
In this condition, what might cause this?
Assuming you're receiving this error only for a small percentage of requests, you shouldn't need to do anything - the error happens when the provided access token is being checked for validity and the app's details can't be verified - usually an intermittent problem affecting only a tiny percentage of requests (unless you're forgetting to include the app ID in your SDK initialisation, in which case check that first)