query permissions to users

Hi,
Could you please advise on how a user gets the permission to use Query endpoints as the api returns 403.

Thank you.

Tagged:

Answers

  • To grant a query to a user, you will want to follow these steps:

    1. Locate the query you want to call.
      1. Administration>Application>Features>Query view search
      2. Search for the name of the query and select it
    2. Assign permissions
      1. Click 'Assign permissions' in the upper left corner
      2. Select a role that the user is in. Since you are calling an endpoint, it may be appropriate to create a 'service user role' for this kind of thing.
      3. Click "Grant"
      4. Click "Save"
    3. Use the new endpoint from code
      1. In the code for your application, authenticate into CRM as a user in the role from step 2-b.
      2. Call the query endpoint - you should receive data

    If that does not work, then can you share some of the code that is failing?

    image.png