0

(I'm using version 4.7 based on Wordpress)

When making a REST api call to retrieve a ContributionPage instance, the response tells me that I "require administer CiviCRM". However, the API key is associated with a user in the Administrators group of CiviCRM (this was configured as such using the "group" dropdown in the "New Individual" form of the CiviCRM contacts menu) . For other entities such as "Contact" the call works.

    # get contribution page
    resp = requests.get(
        url,
        params=dict(
            entity='ContributionPage',
            action='getsingle',
            api_key='xxxxxxxxxxxxxxxx',
            key='xxxxxxxxxxxxxxx',
            json={"id":1}
        )
    )
    print(resp.text)

{"error_code":"unauthorized","entity":"ContributionPage","action":"getsingle","is_error":1,"error_message":"API permission check failed for ContributionPage\/getsingle call; insufficient permission: require administer CiviCRM"}

Does anyone know what could be the problem?

  • Are you using Drupal as CMS. And with an user in the Administrators group do you mean the Administrors role in Drupal? – Kainuk - CiviCooP Mar 23 '18 at 18:50
1

You must also make the user an admin in the Users panel of the host CMS (wordpress, in this case). It's not sufficient to choose Administrators as the value for the "group" dropdown in the "New Individual" form of CiviCRM.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.