serach method for curl -u username:token

Hi there,

how can i use the method below in R ? :smiley:
The answer is a json object.

curl -u username:token https://api.github.com/user/repos

any suggestions… thanks

E.g. as in this stackoverflow entry ?

won#t work because the method need username:token.
Result:
$message
[1] "Requires authentication“

Update:
have now decided to use a short pyhton script as a
worker.

import requests
import json

response = requests.get('https://api.github.com/user/repos',
                        auth=(‚passwd', ’token'))

my_projects = response.text

by means of :
reticulate::source_python('~/Documents/R/github_repo/git_request.py')
the data are then requested in the r script

Works but not my favourite :blush:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.