Notice, you must register for an API Key to use as a password. https://midt.meddra.org/account/register
library(jsonlite)
library(dmtools)
# read MedDRA id and API key from a CSV file
auth <- read.csv("api_auth.csv", sep = ";")
url_auth <- "https://midt.meddra.org/connect/token"
# get token
token <- meddra_auth(url_auth, auth$id, auth$api_key)