Creating a simple Google App using ASP.NET - asp.net

We are working to integrate one of our client's existing accounting system into Google App. Eventually we need to list it on Google App Marketplace.
Here is what we have already done:
Downloaded the sample .NET app available from Google - this one
Created a vendor profile on the Google Apps Marketplace
Listed our test application on the Google Apps Marketplace
So far we have ONLY been able to authenticate the user using DotNetOpenAuth.
We are struggling with following issues:
Unable to access the Calendar Data API and display the next appointment. We are getting 401 Unauthorized when querying the Calendar Data API.
To access the Calendar Data API we need to have a ConsumerKey & a ConsumerSecret - which is made available ONLY after you submit your application for Approval.
We submitted the app for approval to get a ConsumerKey & a ConsumerSecret although its just a pilot app that we are building first. We don't want that app to be published as of now but we could not find a way to keep that listing private and available ONLY for dev & testing purpose as of now.
We have placed the ConsumerKey & ConsumerSecret in the sample marketplace app but even now we get a 401 Unauthorized access while quering the Calendar Data API.
We have already spent 2-3 days trying to find proper documentation for this and get it to work but in vain. Any help / guidance to get it to work and also keep the listing private in dev mode until we are ready, would be really appreciated.
Here is the modified 2 page source code i am trying to run.

There are some key misconceptions in your post.
Your keys are already available to you. Open Marketplace, click on "My Vendor Profile" top right, and look right under the listing, below the stars: View OAuth Consumer Key link is there. If it isn't, you did not mark your app as an installable one. To fix that, create a new app entry, and make sure you provide a valid manifest.
To test your new app, BEFORE you submit your app for approval, open the Marketplace page for it and click the Add it now button. You will be offered a field to enter the Google Apps domain name to test with.
Only domains you add your app to will be accessible with the marketplace key.
Chances are if you sort these two things out things will start working :)

Related

Workaround for web-view blocking google authentication within a web application

Good Morning,
So I am facing a dilemma using Firebase Auth (specifically Google OAuth).
Google seems to have blocked the use of their OAuth when a user access my site via a web-view (for example they have clicked on the link in TikTok and the website has opened within a view in TikTok)
It makes sense as to why Google has blocked this, however, this is now stopping my ads from being successful as users see the ad, click on the link, and then it opens up in the TikTok web view, and then they can't log into my web application.
I'm using the simple Firebase Authentication plugin, with Nuxt/Firebase the code for it is as below:
const provider = new this.$fireModule.auth.GoogleAuthProvider()
provider.setCustomParameters({
prompt: 'select_account'
})
this.$fire.auth.signInWithPopup(provider)
Does anyone know any workaround? I've googled this so much but the only real solution I have come across is if I'm creating an android/ios app and this is not a mobile application, this is just a web application.
Thanks so much for your help.

I have add a apps (BC API DISCOVERY ) in adobe business catalyst. But after add this app then showing a message in yellow box

I have add a apps (BC API DISCOVERY ) in adobe business catalyst. But after add this app then showing a message in yellow box like
(This application is already installed on your site - but it needs to be authorized in order to function.Please contact your developer to authorize the app to run on your site and access your data.)
Please check also a screenshot
enter image description here
Take a look at this article - http://docs.businesscatalyst.com/developers/faqs/api-related-faqs#authorize-first
Basically you can copy the files from one site to the other, however, the first time you need to authorize the app. To do this log on with a partner user and you will have a button to authorize the app.
Do note the site you are authorizing the app for needs to be under your own partner portal.
If you are still having trouble let me know:
-the site you are trying to install the app on
-the app key
-the username you are logging in with
Thanks
Aayush Vashishtha

Google Developers Console: how do I register a new application?

I'm trying to follow this tutorial for Google's Analytics API.
The tutorial says "If you haven't already registered your application with the Google Developers Console, then set up a project and application in the Developers Console".
The documentation for the Developers Console says "A project consists of a set of applications...", which makes sense.
I'm able to create the project, but I don't see any way to create an application within that project. Both pieces of documentation linked above instruct me to click on "Registered apps" in the left sidebar, but there is no such link. (I believe these docs were written for an older version of the Console.)
On the recommendation of another poster, I tried using the old Console instead, but I can't find any "Registered apps" link (or any other way to create an application) in that version, either.
Any ideas?
You didn't say whether you were doing this as a service account, web app, or installed app but this should get you pointed in the right direction for all of those.
And, Google radically changed the console UI.
The application gets created when you create the credentials for an application type.
If you created the project in the Google Console, select the project and follow the instructions in the tut you linked to:
Go to the Google Developers Console.
Select a project.
In the sidebar on the left, select APIs & auth. In the displayed list of APIs, make sure all the APIs you are using show a status of ON.
In the sidebar on the left, select Credentials.
Add this step: Click on the "Create New Client ID" button then select the application type.
In either case, you end up on the application's credentials page.
To find your application's client ID and client secret, and set a redirect URI, expand the OAuth 2.0 Client ID section.
Write down the values for each of these fields:
Client ID
Client secret

Membership.OpenAuth with Twitter works but keeps asking to Authorize App

I am using ASP.NET forms (not MVC) along with their out of the box templated solution for logging using Facebook, Twitter, etc (all wrapped up in Microsoft.AspNet.Membership.OpenAuth).
Everything seems to be working fine except for one thing: Every time a user logs in with Twitter, they are being redirected to Twitter and asked to Authorize the application. Regardless of whether they have done it already (i.e. The user logins for first time, authorizes against the Twitter app, get redirected back to our site perfectly. Then they log out, and go to log in again, and they are re-prompted to authorize. The application shows up in the list of approved apps under the user's Twitter account.
I have ready some places where people are having similar problems, but not using the Microsoft libraries. They seem to point to using a different URL when launching to Twitter, however, I don't seem to be able to find that level of granularity with the MS libraries.
Has anyone been able to reproduce/solve this issue using these libraries? I am not intimately familiar with how this all works, but I notice that DotNetOpenAuth is also a part of my references. If this is the library that is feeding the Membership.OpenAuth classes, perhaps there is an update that I need? My DotNetOpenAuth.OAuth version shows 4.1.0.0 and runtime version if v.4.0.30319.
Thanks,
J
I had the same problem. I'm using the following to connect to twitter:
OAuthWebSecurity.RegisterTwitterClient(key, secret)
and using the latest OpenAuth 4.3.0.0
Login works ok, but it keeps asking to Authorize App each time.
Turned out that in my Twitter App settings I did not have the following ticked
Allow this application to be used to Sign in with Twitter
When I ticked this, the normal OAuthWebSecurity.RegisterTwitterClient() worked fine

Facebook Insights API to asp.net (not an App)

We are trying to help a customer of ours to get their company page FB Insights data out of FB and shown on an Admin website we have for the client. So instead of having to log into FB to see the insights they will be able to see the data (that we put into reports) from the analytics webiste we already have for them.
we just can't figure out how to use the FB API to pull data for an individual fan page in an asp.net application using VB as the programming language.
Did you try to use Facebook C# SDK and try to access insight object:
https://developers.facebook.com/docs/reference/api/insights/
You have to be admin of App/Page to be able to get this to work.

Resources