Zapier troubleshooting - API request to add new user

I’m trying to add a new user (member) from Zapier via the raw HTTP API request Action. I’m running into an OAuth issue, where I’m being told I’m missing scopes (users:write) - but a I understand it, webflow/Zapier is handling the Auth for actions taken via Zapier.

Any idea where I’m going wrong or is this a bug?

{
“request”: {
“method”: “POST”,
“url”: “https://api.webflow.com/v2/sites/64620212a323efa26e66d8f0/users/invite”,
“querystring”: null,
“headers”: {
“accept”: “application/json”,
“content-type”: “application/json”
},
“body”: “{\n "email": "some.one@home.com",\n "accessGroups": [\n "members"\n ]\n}”,
“data”: {
“email”: “some.one@home.com”,
“accessGroups”: [
“members”
]
}
},
“response”: {
“status”: 403,
“headers”: {
“connection”: “close”,
“content-length”: “144”,
“content-type”: “application/json; charset=utf-8”,
“date”: “Sun, 03 Mar 2024 16:58:51 GMT”,
“etag”: “W/"90-IA+UEXpxAZ6oeK4YdYtY02c3QOA"”,
“retry-after”: “60”,
“x-ratelimit-limit”: “60”,
“x-ratelimit-remaining”: “59”,
“x-response-time”: “139.078ms”
},
“body”: “{"message":"OAuthForbidden: You are missing the following scopes - ‘users:write’","code":"missing_scopes","externalReference":null,"details":}”,
“data”: {
“message”: “OAuthForbidden: You are missing the following scopes - ‘users:write’”,
“code”: “missing_scopes”,
“externalReference”: null,
“details”:
}
}
}

I have not used Zapier’s Webflow integrations in some time, but I don’t recall any support for User-specific actions, only CMS actions.

Since you’re doing your POST request directly, the auth token you use defined the oauth permissions. If Zapier is managing this ( some form of saved token ), it will not have the permissions you need.

You can probably overcome this if you create your own token with the permissions you need, and perform your call using that token.

For anyone with a similar issue: I was able to make this API request to update a user through Zapier’s “Custom Action” within a Weflow action. Just treat it like a standard API connection.

1 Like

Hi, could you elaborate on your solution. I’m fiddling a bit with the Custom Action. I want to be able to use it whenever a user is added in Audienceful, a user gets created in Webflow as well :slight_smile: