Ad Sense Management API Generate Report without OAuth? - oauth

I am creating an Application that displays the info of a Single Adsense account for all users. Do I still need to use OAuth for this? Because I do not need any user information, I simply want to show them the Information of one account. Is this possible? I want to do this:
https://developers.google.com/adsense/management/v1.3/reference/accounts/reports/generate#auth
Without using OAuth. Thank you.

You must use OAuth to access your AdSense Account via the Adsense API.
Check the examples, make one run and then substitute your own code.

Related

Integrate my own IDP (Similar to okta) and CIAM into BigCommerce store

I have my own IDP and user store which is used by other apps in order to allow users to login. Right now i am trying to spin up a new storefront using BigCommerce ecommerce platform , for this app i need to use the existing IDP and user store so that users who are using the other apps can single sign-on into the new store front app as well. Can anyone please help on where to start on?
I also had a look into the big commerce Login API using which once can able to login using JWT token for the customers existing already in Bigcommerce platform, But in my case all my user data are store in my custom IAM and i need to log those users into store front seamlessly.
Thanks in advance
You need to provide BC Login API with a signed JWT. That JWT needs to contain the BigCommerce userId to enable it to login. To create the JWT you will need a client ID that can be created by creating an app in your developer account, thus creating the trust and not requiring credentials, just a userId.
This gives some help on creating the JWT and all the info required within it:
https://developer.bigcommerce.com/api-docs/storefront/customer-login-api
And this is a simple example of it working using Express middleware and Auth0:
https://github.com/bc-simonpallister/bc-auth0-oidc
For BigCommerce Single Sign On (SSO), you can definitely use the following information mentioned - https://developer.bigcommerce.com/api-docs/storefront/customer-login-api
But as I understand, you are also looking for a seamless solution for BigCommerce SSO wherein you can skip the complex coding part.
If this was interesting, here is the entire scoop for your reference -
https://www.miniorange.com/integrations/bigcommerce-sso-mfa
PS: You can also enable auto sync using above solution in case you wish to provision your users/groups in future.

Any way to send a Tweet as someone else without applying to Twitter Dev again?

So I applied as a Twitter Dev to make a bot that tweets stuff. About two days later, I got access. When I ran the code with the tokens it gave me, it posts from my account.
My question: Is there a way for me to make it send as another account (a bot account) without me having to apply again?
Yes, you can use the Sign-in with Twitter flow to authenticate a different user to your app, and then use the Access Token and Access Token Secret for that user to post to that account. This is the correct way to implement things - you should not be applying for multiple developer accounts.
You can also use tools like twurl or another CLI tool to
https://github.com/twitter/twurl/
https://github.com/smaeda-ks/tw-oob-oauth-cli
https://github.com/olithissen/twitter-oob
Did you get elevated access from tweeter or Essential? I have a stack error:
You currently have Essential access which includes access to Twitter API v2 endpoints only.
If you need access to this endpoint, you’ll need to apply for Elevated access via the Developer Portal.
It's hard to get Elevated now.

Linkedin access token for application that doesn't require a member to login

Our application can show rich links to webpages. So instead of a mere weblink we show a short summary and a picture. We used to use embed.ly's extract api to supply us with this data, but since they have changed their terms and pricing we have implemented an alternative solution.
The problem we find is that linkedin profile urls cannot be assessed by our new solution. Embedly was able to give us all the details we needed from a linkedin profile url (including the user's picture), but we don't seem to have access to that information without going through linkedin's API.
This call gives us all the data we are looking for:
GET https://api.linkedin.com/v1/people/url=[PROFILE_URL]:(id,email-address,first-name,last-name,headline,summary,formatted-name,picture-url,picture-urls::(original),site-standard-profile-request,public-profile-url)?format=json&oauth2_access_token=[TOKEN]
Where [PROFILE_URL] is a linked in profile url and [TOKEN] is the oauth2 access token.
There are two issues that I have:
Our application does not ask users to authenticate through linkedin, so we do not have a user oauth2 access token available;
Linkedin's suggestion in their FAQ (https://developer.linkedin.com/support/faq) seems very daft:
Can I get an access token for my application that doesn't require a member to login?
We do not provide access tokens for applications that are not associated with a particular LinkedIn member.
If your application requires you to make API calls in an automated way - without user interaction, you need to bootstrap the first access token request by manually signing in, and then ensure that your application refreshes the token automatically prior to expiry to avoid the need for additional human authentication.
Now... four questions:
a. Has anyone implemented option [2] in a production setting?
b. If yes, what are the limitations, downsides etc. Is this really the best and safest solution?
c. Is there any alternative that allows me to authenticate the application itself with its mighty client key and client secret?
d. Is there anyone from linkedin monitoring this? If yes, can you contact me?
Cheers, Raymond

Which Google sign-in flow is the best for a web application?

I'm about to create a web application which has some data linked to individual user accounts in the database. I want to implement it by Google sign-in because I don't want let users create new accounts just for this app. I'm now confusing which flow below is for my case.
Please help me.
https://developers.google.com/identity/sign-in/web/sign-in
Very simple.
https://developers.google.com/identity/sign-in/web/server-side-flow
Server Side flow?
https://developers.google.com/identity/protocols/OpenIDConnect#authenticatingtheuser
 This document says this is Server Flow.
https://developers.google.com/+/web/signin/server-side-flow
Just for Google+ users?
Is the No.1 maybe called "implicit" flow? I would like to take it if it is secure because of its simplicity.
https://developers.google.com/identity/sign-in/web/sign-in is best option for you.
In case you need to "use Google services on behalf of a user when the user is offline" you can use https://developers.google.com/identity/sign-in/web/server-side-flow on top of https://developers.google.com/identity/sign-in/web/sign-in.

Retrieve my adsense report as server application

All I need is like so,
I want to use Ruby and Google API to retrieve MY adsense report (like page views, CTR ...) and save it into my database. (I want it to be automatic)
When an user requests to my page, I will show my saved report to him.
I think it was simple but it's not actually because OAuth 2.0 needs users to authenticate with google. I dont know how I can do it because I dont have any browsers on my server. Is it possible to do so? Can anyone show me how to do it?
The AdSense Management API can be used with the "Installed application" OAuth2 scenario. You just need to generate the refresh token once (you don't need browsers on your server and no human interaction is needed after this).
Here's the generic guide:
https://developers.google.com/adsense/management/getting_started#auth
And the Ruby client library, with the adsense sample:
https://github.com/google/google-api-ruby-client-samples/tree/master/adsense
The client library handles auth for you.

Resources