Skip to content

Authentication And Connect

js.sevestre edited this page Jan 14, 2020 · 6 revisions

Getting the credentials

Follow step 1 in LumApps Api documentation for clientID authorization on LumApps

Authentication using the Lumapps API Client with a refresh token

from lumapps import client

auth_info = {
"CLIENT_ID": 'XXX.apps.googleusercontent.com',
"CLIENT_SECRET": 'YYY',
"REFRESH_TOKEN": 'ZZZ'
}
# or
auth_info = "a service_account.json content"

api = client.ApiClient(auth_info=auth_info)

You may need to set the base url depending on which environment you are :

api_info = {"base_url": "https://sites-ms.lumapps.com"}) 

api = client(
    auth_info=auth_info, 
    api_info=api_info)

Authentication using Low level Google Service Disovery

Find more in Authentication with service discovery