User Manual

Personal Access Tokens

Personal access tokens function like ordinary OAuth access tokens. They can be used to authenticate to the API. If you specify 'New token', a personal access token will be created.

Personal Access Tokens

Please specify the token name and the scopes as authorities given to the application that uses the token.

Personal Access Tokens

Example of API using a personal access token (file upload test)

    <DOC=sample.txt
    <TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    <PROJECT=xxxxx
    <MESSAGE="I've got up at date +%c"
    <FILE=date +%Y%m%d-%H%M.txt

  1. <curl -X "PUT" "https://files.rdm.nii.ac.jp/v1/resources/${PROJECT}/providers/osfstorage/?kind=file&name=${FILE}" \>
  2.     <-H "Authorization: Bearer ${TOKEN}" \>
  3.     <-H "Content-Type: application/vnd.api+json" \>
  4.     <-d ${MESSAGE} &> /dev/null>

Reference (*): https://osf.io/y9jdt/wiki/Typical%20Workflow/

(*) Please note that you need to reread the request destination.