赞
踩
https://api.opengwas.io/api/#authentication
To be deprecated soon - Token obtained from Google OAuth
The documentation provides a list of endpoints, the parameters they require, descriptions of the data that is returned, and an interactive way to try out each of the endpoints.
The database of GWAS summary data mostly contains public data, however there are some ‘private’ datasets, which can only be accessed by authorised users.
Authentication is managed using Google OAuth 2.0. In order to authenticate, you will need to generate a ‘token’ for each session in which private access is required.
The simplest way to obtain an authentication token is to use a browser to authenticate with your gmail account at this link.
The access token can also be obtained using the ieugwasr::get_access_token() function, more information about that here.
From Wednesday 1st May 2024, you need to prove your identity (authenticate) to use our service, even if you are querying a public dataset.
JSON Web Token (JWT) is used for authentication. The token is required for most endpoints. To obtain a token, sign in to the account page. You will be prompted to generate a token, which is valid for 14 days. To use your token, add it into your request header under the key Authorization with value Bearer your_token. Note that there is a whitespace between Bearer and your token.
The API documentation provides a list of endpoints, whether they are protected (require authentication), the parameters and responses, and an interactive way to try out. To try the protected endpoints, click the green ‘Authorize’ button in API docs and provide your token as instructed.
首先需要更新一下ieugwasr包 install.packages("ieugwasr") # 或者你用github安装开发版: # remotes::install_github("mrcieu/ieugwasr") # 载入包 library(dplyr) #这个包提供管道符号支持 library(ieugwasr) # 查看是否识别到token ieugwasr::get_opengwas_jwt() # 返回你的token,说明成功 # user(),查看token对应的用户信息 ieugwasr::user() # api_status() ieugwasr::api_status()
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。