Hi all,
I’m rather stuck with my integration which uses the **Contacts Search
API (**
/crm/v3/objects/contacts/search).
The error message (correlationId removed):
{“status”:“error”,“message”:“This app hasn’t been granted all required scopes to make this call. Read more about required scopes here: https://developers.hubspot.com/scopes.",“correlationId”: "--- ---==”,“errors”:[{“message”:“One or more of the following scopes are required.”,“context”:{“requiredScopes”:[“contacts”]}}],“links”:{“scopes”:“https://developers.hubspot.com/scopes"},“category”:"MISSING\_SCOPES”}
Scopes given to private app as per documentation:
- crm.objects.contacts.read (required as per documentation)
- crm.objects.contacts.write
- crm.schemas.contacts.read
- crm.schemas.contacts.write
Behaviour:
- When instantiating the Python Integration class from the Python shell (not in a Docker container), the requests to the Contacts search endpoint works flawlessly and data is retrieved.
- When running the same integration from within a Docker containe as a worker, the scoping error provided is displayed.
Debugging performed:
- Added a breakpoint using ipdb where the environment variable for the Private App key is imported from the environment
- Result: Private App key successfully imported
- Added a breakpoint where my HubSpot_Client class is instantiated with the Private App key as a parameter
- Result: HubSpot_Client class instantiated with the correct HubSpot API Private App key
- Added a breakpoint in the function where the Private App key is added to the request header
- Result: Private App key successfully added to the request header
Questions:
- Are any further permissions required to make requests from a certain environment, like a Docker container?
- Could using the same key for testing in the Python shell and in a Docker container be causing the request to be rejected for some reason?
Thank you for your time!
Johann