Skip to content

Trying to send POST request in R but didn't work #4

Description

@garyzhubc

Trying to send POST request in R but didn't work. I tried:

require(httr)

token_endpoint = 'https://icdaccessmanagement.who.int/connect/token'
client_id = '-------'
client_secret = '----'
scope = 'icdapi_access'
grant_type = 'client_credentials'

r <- POST(token_endpoint, add_headers('client_id'= client_id, 
                                            'client_secret'= client_secret, 
                                            'scope'= scope, 
                                            'grant_type'= grant_type))

with package httr following a Python version of this https://github.com/ICD-API/Python-samples/blob/master/sample.py

but I don't know where to find access_token in r

enter image description here

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions