API Rest Sharepoint with SharePlum - shareplum

I have some problems with the access to the Rest_API Sharepoint (Python)
I'm using Shareplum library but I have an issue about the authenticacion oficce 365.
Could you help me with that problem?.
Thanks in advance!!
Code:
from shareplum import Site
from shareplum import Office365
from shareplum.site import Version
from shareplum import Site
authcookie = Office365('https://mysharepoint.com', username='userkey', password='password').GetCookies()
site=Site('https://mysharepoint.com/sites/seccion/', version=Version.v365, authcookie=authcookie)
Note:
the version is correct
Username and Password don't have strange characters
Out:
Exception: ('Error authenticating against Office 365. Was not able to find an error code. Here is the SOAP response from Office 365', b'<?xml version="1.0" encoding="utf-8"?><......

Related

The method 'installAppCheckProviderFactory' isn't defined for the type 'FirebaseAppCheck'

i am trying to use firebase new feature which is App check for flutter app in android emulator.
i am trying to activate the debug provider for android by following this instructions app check .
for line "firebaseAppCheck.installAppCheckProviderFactory(
DebugAppCheckProviderFactory.getInstance());" , i got error message that says The method 'installAppCheckProviderFactory' isn't defined for the type 'FirebaseAppCheck'
does anyone know how to solve this problem
I have run into the same problem myself.
It's not stated on this page but the imports you need are:
import com.google.firebase.FirebaseApp;
import com.google.firebase.appcheck.FirebaseAppCheck;
import com.google.firebase.appcheck.debug.DebugAppCheckProviderFactory;

Error #types/signalr/index.d.ts is no ta module

I'm trying to use signalr with Typescript. Server side is ASP.NET (not ASP.NET CORE) I installed both signalR (https://www.npmjs.com/package/signalr) and #types/signalr (https://www.npmjs.com/package/#types/signalr).
My import looks like this:
import * as signalR from 'signalr';
The problem is I got an error: "File '... /node_modules/#types/signalr/index.d.ts' is not a module.
Not sure what to do about this. It's only with signalR library I have this problem.
Simply using import 'signalr' worked.

Sign in with LinkedIn, SDK for Android, Sample application error

I would like to try feature "integrate Sign In with LinkedIn".
I follow instructions and i download latest version ( Mobile SDK for Android 1.1.4) from:
https://developer.linkedin.com/downloads#androidsdk
Then i import and build project into Android Studio.
When i execute SDK for Android Sample App i obtain this screenshot:
http://i64.tinypic.com/35hpvyb.png
Any help will be appreciated. Greetings
I answer myself.
The problem was i didn´t follow (ignore) step "Associate your Android app with your LinkedIn app"
https://developer.linkedin.com/docs/android-sdk
1) Create an application
2) Signing Your Application, generating a debug key hash value.
3) Configure the values: In the Mobile->Android Settings->"Package Name & Package Hash" section of your LinkedIn application's configuration, add your application's package and hash values
That´s all. Sorry for such a dumb question... ;)

Kivy Async Image - Static Google API doesn't load

i try to asyncronously load a static google maps image via the google api.
The code below is taken from the kivy reference base, it works with other images, but not if i use the google link. The link works fine in the web browser. (Also note that the source string is in one line in my original py file, that just doesn't display right here)
my kv
from kivy.app import App
from kivy.uix.image import AsyncImage
from kivy.lang import Builder
class TestAsyncApp(App):
def build(self):
return AsyncImage(
source='http://maps.googleapis.com/maps/api/'+\
'staticmap?center=47.909,7.85&zoom=13&size=600x300')
if __name__ == '__main__':
TestAsyncApp().run()
Help is very appreciated!
With Kivy 1.8.0, URLs like the one above don't work as expected. Kivy tries to parse the URL and find the file extension, which fails of course. In the development version, we now check the MIME type reported by the server, but you can work around this in 1.8.0 by using a fake query parameter:
return AsyncImage(
source='http://maps.googleapis.com/maps/api/'+\
'staticmap?center=47.909,7.85&zoom=13&size=600x300&ext=.png')

Google Drive API - Example code is not working

I want to use Google API to transfer SharePoint Documents to Google Drive using dot net. For that to happen I want to use this link Google Quick Start.
I have followed every little piece of information. It states in beginning "Complete the steps described in the rest of this page, and in about five minutes you'll have a simple Drive app that uploads a file to Google Drive" but it is not true.
I am trying to run this sample example since yesterday but failed.
// Register the authenticator and create the service
var provider = new NativeApplicationClient(GoogleAuthenticationServer.Description, CLIENT_ID, CLIENT_SECRET);
var auth = new OAuth2Authenticator<NativeApplicationClient>(provider, GetAuthorization);
So it seems that this code example is outdated and Google APIs have been upgraded.
Here comes the warning
[Obsolete("GoogleAuthenticationServer is not supported any more and it's going to be removed in 1.7.0-beta. Consider using the new Google.Apis.Auth NuGet package which supports .NET 4, .NET for Windows Store apps, Windows Phone 7.5 and 8 and Portable Class Libraries as well")]
Another code
var service = new DriveService(new BaseClientService.Initializer()
{
Authenticator = auth
});
And the error
Cannot implicitly convert type 'Google.Apis.Authentication.OAuth2.DotNetOpenAuth.NativeApplicationClient' to 'Google.Apis.Http.IConfigurableHttpClientInitializer'. An explicit conversion exists (are you missing a cast?)
Then I was looking for [latest release samples] there I found the source files.
I was not able able to run the sample also.
Here I was successfully authenticated but then had error for redirect Uri
My Client_Secrets.JSON looks like, as you can see I have set default redirect Uri to http://localhost/.
{"web":{"auth_uri":"https://accounts.google.com/o/oauth2/auth","client_secret":"secret","token_uri":"https://accounts.google.com/o/oauth2/token","client_email":email","redirect_uris":["http://localhost/"],"client_x509_cert_url":"aa#developer.gserviceaccount.com","client_id":"id","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","javascript_origins":["http://localhost:53404/"]}}
Now I can run this application but as mentioned getting error
Error: redirect_uri_mismatch
The redirect URI in the request: [[http://localhost:2430/authorize/]] did not match a registered redirect URI
I really don’t know from where this port number comes and from where this authorize comes. As you can see in my JSON, I have not set anything similar.
I am using VS 2010 SP1 Ultimate and Windows 7 home Basic.
I have tried to give complete information and my end goal is upload document in Google drive.
The tutorial you are following uses an older version of google.apis thats why you are seeing the not supported. Here are a couple of tutorials on how it works with the new version of the api.
http://daimto.com/google-oauth2-csharp/
http://daimto.com/google-drive-api-c/
Take a look in https://code.google.com/p/google-api-dotnet-client/source/browse/Tasks.ASP.NET.SimpleOAuth2/Default.aspx.cs?repo=samples. It's a Task API ASP.NET sample. As you can see you need to add several lines of code, but it works.
I downloaded the samples Eyal mentions and got that compiling before integrating with my own app. .Net needs to be 4 although it states it supports higher.
You have to set the redirect URI in the google developer console, not in your JSON. In your case, you would want to set it to http://localhost:2430/authorize/.

Resources