Question

OAuth scope for RTBF Delete Responses

  • 29 August 2023
  • 5 replies
  • 110 views

We are using OAuth2 to get the access token to call the following RTBF Delete Responses route (https://api.typeform.com/rtbf/{account_id}/responses). I do see that this route throws a 401 with with following error message “no workspaces from the api for account xxxxx”. Is this something related to the OAuth scopes (Using the following Oauth scopes to get the access token: responses:read', 'responses:write', 'forms:read', ‘workspaces:read’, 'offline'). The error message is generic and it would be great if anyone could help us understand why we see this error messasge


5 replies

Userlevel 7
Badge +5

Tagging @mathio for some help!

@mathio, to give some more context we do the following steps:

  1. Use https://api.typeform.com/forms route to fetch all the forms present
  2. For each form, use https://api.typeform.com/forms/{form_id} route to fetch workspace href url.
  3. From workspace url, get Account Id using  https://api.typeform.com/workspaces/{workspace_id}
  4. Finally, call delete RTBF to clear response.Where in we see the following error message “no workspaces from the api for account xxxxx”.

Ideally in this flow we are pulling the account_id corresponding to a form in realtime using the above api’s, not sure why we are ending up with this error.

Userlevel 7
Badge +5

I am sorry but I have no experience with this endpoint. I tried to make the API calls as you listed them and it worked fine under my account. I think the RTBF endpoint requires responses:write permissions only, but I am not 100% sure.

Based on the error it looks like there are no workspaces available for the user who owns the auth token. I asked the team responsible for this service to have a look at this and possibly provide more context on the error.

Userlevel 7
Badge +5

Hi @TranscendDev 
Are you trying to do this on your account on our customer’s account on their behalf?

Userlevel 7
Badge +5

Hi @TranscendDev Hope you’re having a great week so far! Just checking back to see if you still need some help. 

Reply