Hi Team,
User who doesn’t have automation(workflow) access while installting our application getting this below mentioned error
"Failed to create a workflow due to This oauth-token (CIy8-6G) does not have proper permissions! (requires all of [workflows-access-public-api])"
.
To resolve this issue we are fetching the user details from access token using the mentioned api link . even though user doesn’t have automation/workflow access. still automation scope is present in scopes list available in api response.
Is there any solution how we can avoid calling create workflow api for user who doesn’t have automation/workflow access?
looking forward for quick solution.
Thanks
shridhar kanagond
(7204674745).
Hey, @Shridhakanagond
One thing you can try is setting non-vital scopes to be optional, as documented here — Optional Scopes. This allows users who either don’t have the required elevated permissions or a matching level of HubSpot subscription to still install your app.
Have fun building! — Jaycee
Hey @Jaycee_Lewis ,
we wan’t to skip the creation of worklfow through api for user doesn’t have workflow access.
can you please tell me what are the scopes required for “workflows-access-public-api”
OR
what are the scopes required to understand whether the user has workflow access or not.
Hey @Shridhakanagond , apparently you’re using the v3 API, in v4 API error response body it’s clarified that the missing OAuth scope is “automation”. Setting it helped me start using the v4 API, although in v3 I’m now getting the 404s. For Automation v4 API docs, see Accounts Dashboard | HubSpot