OAuth scope for RTBF Delete Responses | Community
Skip to main content
Question

OAuth scope for RTBF Delete Responses


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

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 15018 replies
  • August 29, 2023

Tagging @mathio for some help!


  • Author
  • Explorer
  • 1 reply
  • August 29, 2023

@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.


mathio-tf
Typeform
Forum|alt.badge.img+5
  • Typeform
  • 888 replies
  • August 30, 2023

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.


picsoung
Typeform
Forum|alt.badge.img+5
  • Developer Advocate @ Typeform
  • 390 replies
  • August 31, 2023

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


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 15018 replies
  • September 5, 2023

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


Reply