Get facebook campaigns for specific user - facebook-ads-api

Good day!
I'm trying to get campaigns, which related to adAccounts where i was invited, via Facebook API, but i'm getting an error that only admin of this adAccount can use this method(https://graph.facebook.com/v2.8/act_{ad_account_id}/campaigns). This is weird, because i can see some of the campaigns on my ad page in Facebook.
So the question is: how can I get the campaigns for user, which token was provided.
Is it even possible?

if i understand : what you need is to your app (website) access the ads campaigns of the other users
this is possible if they give your app (website) the permission of it.
the facebook api need 3 fields to work :
Api::init($app_id, $app_secret, $access_token);
the $app_id and the $app_secret must be the yours from : facebook for developer
the $access_token is what you need to access your ads or other users ads
so if you need to access other users ads you must ask them to give you the permission and to do it you need to follow the tutorial in this page
you can now access any users campaigns and see it if they give you the permission

Related

is there a way to make events on google calendar into accounts signed with OAuthv2.0 on a CMS laravel website

sorry if this question is not sraightforward. I searched a lot and didn't find the result I want.
I have a CMS website which a specific role of user can link their account on the website to a google account by OAuth. I want to create event in user's calendar from by a form in my website. Now I have set the Oauth and I've created a form that creates events in my developer account.
All i found is creating events on developer account. I found one exactly like I want but in electron not laravel

How to get authorization for accessing Google Play developer API

I am trying to access Google play developer API https://developers.google.com/android-publisher/ to build an inapp purchase product for my company Application.
We have to get authorization to make a GET call to the Google play developer API. https://developers.google.com/android-publisher/api-ref/purchases/subscriptions/get
I followed the steps presented here. https://developers.google.com/android-publisher/authorization
Created an Oauth client and and also service account. The gmail account I used was part of the 'Users and permissions' in play.google.com console.
But when I tried to access the API, I got an error
As I started searching about this error, I understood that there is something else called 'API Access' in play.google.com. When I tried to access it, All I saw was
But I saw in other posts that there exists a screen with details like
https://i.stack.imgur.com/Hdjjy.png
So how can I go forward to access API. I did everything as mentioned in documentation of google but it didnt work. Also I dont have access to see the screen of 'API Access'.
Also I am confused, if you can create service accounts from both 'API Access' screen and also from 'credentials' screen in console.developers.com, which one should be used ?
Just to check you understand there are a few different APIs to do with in-app purchases.
Play billing library is designed to be used in your app. This is what allows users to buy things from your app
Configuring in app products. When your app supports in-app products you have to support what the products are and the prices. This is done via the Play console, either manually or in batches uploading CSV files.
Finally is the API you refer to in your question. This is not designed for use in your app, and you don't have to use it to support in-app products. Instead this API allows your server (not app) to validate a user's purchase. In order to use this API, you need to enable the "API access" in the page you found. This can only be enabled by the account owner for the Play console, for security reasons. You will need to find the Owner of your Google Play account, and get them to log in and create a service account which has API access.
I am able to access it now. I am not the owner of the Google Play console.That was the issue. You just have to go to API Access page and click on "create OAuth Client" or "create Service Account ".
You can use those credentials to access API from postman or through your code.

How do I get the Google user ID from an email address?

I want to display the GMail avatar of the user in my app. I can easily get the image URL, using the Google People API. But this API expects a user ID.
Which other Google API can I use to pass in an email address, and get back the user ID?
The Google people api is technically hooked up to Google Contacts. So if you authenticate your user and they have added themselves with a picture you will see it that way.
The Google+ api will work the same way you authenticate the user and if they have added a picture you will be able to see it.
Which other Google API can I use to pass in an email address, and get back the user ID?
NONE. There is no way Google or any other company is going to give you an api that is going to let you search on peoples email addresses and return a picture or any information about said person you may want to consult GDRP
Email address is private user information and is only accessible by being authenticated.

Login With Google Access Control Using GSuite Groups

We are trying to implement a "Login With Google" feature for an internal admin dashboard web app connected to our GSuite account. We want to limit login to this dashboard in two ways.
Only members of our GSuite domain can login to the dashboard
Only users in our domain belonging to a specific group within our domain can login to the dashboard
So far we have been able to accomplish number 1 above but not 2. Using a query param to the oauth2 API we can limit the domain. What we have in mind to accomplish number 2 is after the user within our domain is logged in, get their group information and validate that they are in the proper internal group or log them out. The issue with this is it seems only GSuite admin accounts are allowed to make API calls to the Directory API for this information. Is there no way to get the group information for a user with their own access token or using a service account? Ideally we don't want to have to provide a specific admin user within our GSuite account's personal credentials in our application to get this working. Is there a better way to proceed?
Thank you in advance for any help!

Google OAuth/Google+ Api with multiple account

Spent the whole day to explore this ... api. But did not get the desired result.
Task - allow user login to my site with google account.
I have two google account. I want select what account use.
I read this doc
But this not allow select account and use "default"
I try use gapi.auth.authorize({..., authuser: -1}). This allow select account but ... i must twice select account.
I can`t find documentation about /AccountChooser
How I can correctly login with select needed account?
I find next solution - my code my blog
I use this docs Google OAuth API
Call https://accounts.google.com/o/oauth2/auth ton get access_token
With https://www.googleapis.com/oauth2/v1/userinfo?access_token= get user details
I was struggling with this problem on iOS, create a framework for it. https://github.com/Thywis/MultiAccountOauth
Basically, you have to sign in and restore the credential for multiple account, but I'm not sure why the Google iOS framework doesn't allow you to do this.

Resources