how to fix salesforce wave FUNCTIONALITY_NOT_ENABLED error?

327 Views Asked by At

When I try to access Salesforce Analytics REST API using python, it returns following JSON response:

[
    {
        "message": "This feature is not currently enabled for this user.",
        "errorCode": "FUNCTIONALITY_NOT_ENABLED"
    }
]

Here's the python code:

access_token = ''
instance_url = ''

def authentication():
    global access_token
    global instance_url
    params = {
        "grant_type": "password",
        "client_id": "<My Consumer Key>", 
        "client_secret": "<My Consumer Secret>", 
        "username": "<My Username>", 
        "password": "<My Password>" 
    }
    r = requests.post("https://login.salesforce.com/services/oauth2/token", params=params)
    print(json.dumps(json.loads(r.text), indent=4))
    access_token = r.json().get("access_token")
    instance_url = r.json().get("instance_url")


def wave_service():
    headers = {
        'Authorization': 'Bearer %s' % access_token
    }
    r = requests.get(instance_url+"/services/data/v49.0/wave", headers=headers)
    print(json.dumps(json.loads(r.text), indent=4))

Is there any possible way to enable this wave functionality?

0

There are 0 best solutions below