Skip to content

Instantly share code, notes, and snippets.

@ryanpraski
Last active January 15, 2018 05:35
Show Gist options
  • Save ryanpraski/e5fcbcb1528527c8c6ce3478d30c24f4 to your computer and use it in GitHub Desktop.
Save ryanpraski/e5fcbcb1528527c8c6ce3478d30c24f4 to your computer and use it in GitHub Desktop.
drift_api_query_with_R
library(httr)
library(rjson)
url <-'https://driftapi.com/conversations/52662097/messages'
token <-'AQ14yXgTM934cMjNEGfa6epBDU6TpCIY'
query <- GET(url, add_headers('Authorization' = paste("bearer", token)))
http_status(query)
df <-fromJSON(content(query,type='text',encoding= 'UTF-8'))
@ryanpraski
Copy link
Author

image

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