Accessing data using API returns 403 forbidden error

Dear all,

I am using robotoolbox, an R package to successfully retrieve asset lists with kobo_asset_list() when retrieving from https://kobo.humanitarianresponse.info/ However, when trying to access the asset_list on a different account on https://kf.kobotoolbox.org/ I get a 403 forbidden error.

I follow 3 steps:

  1. to get access token
    kobo_token(username = "tkilimba", password = "notthepassword", url = "https://kf.kobotoolbox.org/")
  2. set up my R environment for access:
    kobo_setup(url = "https://kf.kobotoolbox.org", token = "xxxxxxxxxxxxxxxxxxxxxxxxxxx")
  3. Retrieve asset list:
    kobo_asset_list()

The final command results in
image

Any help appreciated

Welcome back to the community, @Tumaini! Maybe you could try using this approach as shared by @dickoa:

1 Like

Thanks @Kal_Lam , but that post is where I originally learned of robotoolbox, but it does not answer the issue I currently have unfortunately

@Tumaini, you could continue your discussion in the post I have shared where @dickoa should be able to help you out.

1 Like

Hi @Tumaini,

Thanks for raising this issue. Can you check that the token obtained using kobo_token is the same as the one you have when you log in to your kf.kobotoolbox.org account, in ‘Account setting’ ?
If you copy the token manually, in account setting and use it in kobo_setup does it work ?

You can also check if the username and password are the same as the one you will use to log into the kf account.

Thanks

1 Like

Hi Tumaini, How can I access this package in Rstudio?

Hi Dickoa, How do I access this R package (robotoolbox)

Hi @jkato_sensas

I wrote a quick intro here:

I’m available if you have some questions.

Best,
Ahmadou

1 Like

Hello Dickoa, thanks for the guidance. I just have one question. Do u have any video tutorial that shows this process?

I have been trying to implement the process based on my jnderstanding of what u have shared so far and it seems hard on my side.

I think it could be easier if there is any video tutorial u can direct me to.

Thanks a lot brother for your support as I’m handling a project generating over 20,000 records or cases and i would like to create a dynamic dashboard in Rstudio.

PACE takes a ZERO torolence approach towards Fraud, Sexual exploitation, abuse and harrassment. To report violation to any PACE policy. Visit: or Visitfor details about our policies At PACE, we have a culture of zero tolerance to all forms of abuse and mistreatment, including Sexual Exploitation and Abuse, Harassment, Intimidation and Bullying. For violation or percieved violation to this policy. email: PACE promotes an ethical workplace culture and environment and takes a Zero Tolerance approach towards fraud. PACE employees and stakeholders have an obligation to act in a diligent manner to prevent fraud. For any violation or percieved violation to this policy, email:

Yiu can also get back to me on jkato@pace.org.ug

Thanks brother

PACE takes a ZERO torolence approach towards Fraud, Sexual exploitation, abuse and harrassment. To report violation to any PACE policy. Visit: or Visitfor details about our policies At PACE, we have a culture of zero tolerance to all forms of abuse and mistreatment, including Sexual Exploitation and Abuse, Harassment, Intimidation and Bullying. For violation or percieved violation to this policy. email: PACE promotes an ethical workplace culture and environment and takes a Zero Tolerance approach towards fraud. PACE employees and stakeholders have an obligation to act in a diligent manner to prevent fraud. For any violation or percieved violation to this policy, email:

Hello Dickoa, thanks a lot for this quick intro. It finally worked

2 Likes

Hi @jkato_sensas

I’m glad it worked, but point taken on making a short video.

1 Like