5

I am unable to get the following working:

    import zcrmsdk
    
    config = {
    "apiBaseUrl":"https://www.zohoapis.com",
    "apiVersion":"v2",
    "currentUserEmail":"sample@gmail.com",
    "sandbox":"False",
    "applicationLogFilePath":"./log",
    "client_id":"1000.1xxxxxxxxxxxxxxxxxxxxxxxxxxxC",
    "client_secret":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "redirect_uri":"http://localhost:800/some_path",
    "accounts_url":"https://accounts.zoho.com",
    "token_persistence_path":"",
    "access_type":"online"
    }
    
    zcrmsdk.ZCRMRestClient.initialize(config)
    oauth_client = zcrmsdk.ZohoOAuth.get_client_instance()
    grant_token = "1000.xxxxxxxxxxxxx.....xxxxxxxx...x.x.x"
    oauth_tokens = oauth_client.generate_access_token(grant_token)
    
    print(oauth_tokens)

I get the AttributeError: module 'zcrmsdk' has no attribute 'ZCRMRestClient'

I know I am missing something. What am I missing? Can someone please help?

Atahan
  • 61
  • 3
  • 1) Include details on the libraries you are importing. 2) Include a link to the documentation that you are using. – John Hanley Apr 11 '21 at 20:24
  • 1
    Thank you for the response. Here is the link to GitHub repo [**Zoho/zcrm Git Repo**](https://github.com/zoho/zcrm-python-sdk). I installed through 'pip' as directed. When I check my local 'zcrmsdk' folder (where the Python modules are), I do not see the same .py files as I see them listed under the [**zcrmsdk**](https://github.com/zoho/zcrm-python-sdk/tree/master/zcrmsdk) folder in the GitHub repo. And, here is the documentation I followed in order to communicate with the Zoho, https://help.zoho.com/portal/en/community/topic/kaizen-16-python-sdk – Atahan Apr 11 '21 at 21:43
  • 1
    Put the requested details in your question. Third-party links are OK but your question must be self-contained and not require going to external links. – John Hanley Apr 11 '21 at 22:25
  • Having similar issue, did you find a solution for the same? – Yugendran Apr 21 '21 at 15:52

1 Answers1

2

Had the same issue. I think it has to do with the version you are using.Version zcrmsdk==2.0.12 has this attribute available.

serna
  • 21
  • 3