-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't generate API token #52
Comments
It looks like the red list API is currently down, as you've identified. Unfortunately, I'm not affiliated with IUCN, so there's not much I can do on my end. Hopefully the issue will be resolved soon. |
I reached out to the Red List team, and unfortunately, I received the following reply:
|
In case it helps in the meantime, GBIF looks like it has a recent (May 2023) snapshot of the IUCN Red List dataset -- including threat status: https://www.gbif.org/dataset/19491596-35ae-4a91-9a98-85cf505f1bd3 You might be able to sub in something from
|
I also reached out to the Red List team last week, no response. Looks like the API route is dead for now with no outlook on a solution. Anyone have some ideas on other ways to get access to historical IUCN Red List dataset to look at changes over time? |
maybe on CD (at least for older versions...) |
I found a fairly simple way to access it. On the page they have several examples of the outputs. Just by copying the API of the example (visible in the url) it is possible to access the dataset. |
Hi Everyone, I'm Simon and I'm the Conservation Informatics Manager at the IUCN. As you've rightly identified, we're having some issues with the v3 API at the moment - we had to turn off token generation while we work to understand a few technical issues with this aging system. We've ended up getting a little sidetracked with this work as we've been pulled away to work on the 2023-1 Red List update, so fixing the API token system has, unfortunately, fallen by the wayside. I apologise that this hasn't been communicated more clearly. As @malmagrok points out you could, for now, use the example API token on the understanding that you are allowed to use IUCN Red List data as per the terms and conditions i.e. for non-commercial purposes Now to the good news. We're actively working on a "next-gen" API (v4) and we hope to have a beta version ready in Q1 2024 (but this might spill over into early Q2 2024) @willgearty Would you be the best person to contact nearer release about updating Cheers! |
Thanks for the information @simon-tarr, and it's great news that you're working on a new API. Yes, please reach out to me closer to the release so I can update rredlist! |
Great! I'll be in touch soon. |
It will be nice to have the iucn api functioning again! |
Hello, |
@mcauchoix the examples are here. For example, to get the count of species in the API, you could go here. That latter link has the example token that you can use, provided you are using it for non-commercial purposes as described above. |
@simon-tarr Hi Simon, it appears that the API is still down? |
Dear All, this is to let you know that you can now sign up for the new v4 API here: https://api.iucnredlist.org/users/sign_up Note that the new API is still in beta so things may change from time to time until we're out of the beta phase. Also, to the best of my knowledge, none of the community R packages that query the v3 API have been updated to query the v4 API so, until this work can happen, you will have to develop your own methods for extracting data from the API e.g with |
Good news! |
My plan is to update the |
Does the api support python? Error 401 using requests, forbidden. I can access it on the website but not in python. |
I'm not sure why you're getting the 401 error @Andresmrv3 - the API is language agnostic as it's just a regular old OpenAPI spec API. Have you signed up to the new v4 API and provided your v4 token (displayed in your user area after signing up) |
@simon-tarr Fixed. I was using bearer authorization, that was the problem. I can't wait to explore! Thank you so much! |
This link does not work, as the package and the rest of all. It's a shame that accessing the information has become so difficult. So much research halted because we cannot access the information properly. |
Apologies, there was a typo in the URL - somehow a full stop crept into the end of the string. The correct link is https://api.iucnredlist.org/users/sign_up |
Thank you for the quick response, and sorry if I seemed rude. But I have
been trying to get this data for a few days. I can generate the key, but it
still doesn't work with the package and I cannot access the information. It
always shows "invalid token." I have a certain deadline for this article
due to the guidelines of the institution where I am doing my PhD.
Em seg., 24 de jun. de 2024 às 10:10, Simon ***@***.***>
escreveu:
… Dear All, this is to let you know that you can now sign up for the new v4
API here: https://api.iucnredlist.org/users/sign_up./
Note that the new API is still in beta so things may change from time to
time until we're out of the beta phase. Also, to the best of my knowledge,
none of the community R packages that query the v3 API have been updated to
query the v4 API so, until this work can happen, you will have to develop
your own methods for extracting data from the API e.g with httr2.
This link does not work, as the package and the rest of all. It's a shame
that accessing the information has become so difficult. So much research
halted because we cannot access the information properly.
Apologies, there was a typo in the URL - somehow a full stop crept into
the end of the string. The correct link is
https://api.iucnredlist.org/users/sign_up
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYFXEPUGOTQRJDJ7V5DW223ZI7H7JAVCNFSM6AAAAAA4QIIGJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBVHA3TOOBZGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Karoline Azevedo, M.Sc.
Biologist
Phone: +55 (82) 99905-1210
Lattes/C.V. (Pt): http://lattes.cnpq.br/5407395559226556
ORCID ID (En): https://orcid.org/0000-0002-6302-4187
|
Unfortunately the open source community hasn't had the time yet to update their packages to account for the new structure of the v4 API - until this happens, you won't be able to use Remember, you can always download the data as CSVs from the Red List website. If you specify a query on the Advanced Search page, there's a "Download" button that will let you get the data as .csv files: |
What authorization method did you use instead of bearer authorization? I thought that was what you were supposed to use. I am using JavaScript/Node.Js for my queries, but when I enter my API key in my headers, I get the error: Unauthorized when I sent a request. |
That is no longer possible unless I am doing it wrong. If you access the |
I'll take a look this upcoming week. If necessary , I can release a quick patch until the new full version is done. |
The examples for v3 of the API are still hosted here: https://apiv3.iucnredlist.org/api/v3/docs. You can take the API token from any of those examples and use that with |
In case anyone else has trouble accessing the v3 API documentation at https://apiv3.iucnredlist.org/api/v3/docs, you might find this snapshot on the wayback machine useful: https://web.archive.org/web/20240330190522/https://apiv3.iucnredlist.org/api/v3/docs |
|
It works, thanks for your sharing the good way |
Excuse me, it's September 2024 and I'm trying to utilise the v3 version of the api, the rredlist version is 0.7.1, but R carries out the following error: Error in curl::curl_fetch_memory(x$url$url, handle = x$url$handle) : |
Just tried testing the V3 API and it still seems to be working for me. Here's what I used:
@nicholasZ16, maybe it was temporarily down when you tried using it? |
Thanks @jeffreyhanson for looking into this! I'm guessing the API was indeed temporarily down when @nicholasZ16 tried using the package. Also, FYI to everyone here, I'm planning to start work on the new version of rredlist this week. I will keep you all updated as that progresses (and I'll certainly be looking for beta testers in the near future). |
No worries! Awesome - thank you very much @willgearty! |
Also, I'm happy to help out with beta testing. |
I am also interested in beta testing as well. |
I've made a new version of remotes::install_github("ropensci/rredlist@api_v4") Note that, while this new version has most of the functionality and documentation of the new API, it has not yet been thoroughly tested. If you find any issues (or have any requests), please report them in this pull request: #57. I'll also note that, for anyone that hasn't tried out the new API yet, you'll notice that it has changed the focus from species to assessments. If you filter the assessments that are returned by most of the new functions by the "latest" column, I believe that should give you a list of unique species matching your query. Thanks in advance for anyone that puts in time to test out the new version! |
Brilliant - thank you very much @willgearty! I'll make some time to look at this on Friday. |
could you please help me to find out what is the code to get the category of a list of species from excel? I have tried out several codes but I still get an error message, I keep gettig a message of "NA" for all the species. |
Could you be more specific and provide a reproducible example? If you're looking for an API key, see the discussion above for details on API keys for both versions of the API. |
thank you, the token was the problem, I could finally work it out using the example token from the web. |
hello all, I was trying to use the above demo API v3 but it is not working. Could you please share any additional API keys I could try using? I need to access the old API as the package I'm trying to use has not been updated yet for API v4. thank you! |
Is the new version currently being maintained? I've just tried to install it, but got an error message:
The old v3 token that people mentioned still seems to be working. Is this currently the only way to effectively use the API in rredlist? |
The changes have been merged to the main GitHub branch. You can install the current development version as follows: remotes::install_github("ropensci/rredlist") |
Hi there,
I'm trying to get the IUCN categories for some species. For that you need a key, which one should be able to generate here:
https://apiv3.iucnredlist.org/api/v3/token
Nonetheless, the link doesn't work, and therefore I cannot retrieve any kind of information form rredlist.
Cheers,
Marcel
The text was updated successfully, but these errors were encountered: