Coder Social home page Coder Social logo

ConfigFile about adobe-analytics-api-2.0 HOT 3 CLOSED

pitchmuc avatar pitchmuc commented on August 28, 2024
ConfigFile

from adobe-analytics-api-2.0.

Comments (3)

pitchmuc avatar pitchmuc commented on August 28, 2024

thanks for logging that enhancement request @akashachanta01
It should be possible to connect with only the following information:

  • org id
  • client ID / api key
  • token

but we would need to trick the system a bit.
I will provide a function to do that if this succeed.

You would need to use the configure method to add the org_id and "fake" other info.
So your python code should look something like this

import aanalytics2
my_org_id = "realOrgID"
my_client_id = "realClientId"
aanalytics2.configure(org_id=my_org_id,tech_id="anyString", secret="anyString",path_to_key="anyString",client_id=my_client_id)

once you have setup that, you will need to set manually the token and an expiration date for the token.
So I would do something like this afterwards:

myToken = "realToken"
import time
expiration = int(time.time()) + 20 * 60 * 60
aanalytics2.config.config_object['date_limit'] = expiration
aanalytics2.config.config_object['token'] = myToken
aanalytics2.config.header['Authorization'] = 'Bearer '+myToken 

Once that is done, you should be able to use the module like in the videos or documentation.
Note : You won't have automatic refreshing of the token after 20 hours in this case.

Let me know if this works as I expect it to.

from adobe-analytics-api-2.0.

akashachanta01 avatar akashachanta01 commented on August 28, 2024

Thanks @pitchmuc , this worked out fine for me . Will reach out to you if I have any other questions . Thanks !

from adobe-analytics-api-2.0.

pitchmuc avatar pitchmuc commented on August 28, 2024

I have streamlined this method so you can use the configure method in order to pass the information.
Please refer to this part of the get-started documentation

from adobe-analytics-api-2.0.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.