OHDSI Home | Forums | Wiki | Github

Problem using ROhdsiWebApi with security enabled Atlas/WebAPI

Hi everyone,

I’m trying to use the ROhdsiWebApi package to get the meta data for cohort definitions from a security-enabled ATLAS/WebAPI.

I followed the instructions (https://ohdsi.github.io/ROhdsiWebApi/articles/authenticationSecurity.html) and used the authorizeWebAPI() function to authorize ROhdsiWebApi.
Running ROhdsiWebApi:::ROWebApiEnv[["https://yourSecureAtlas.ohdsi.org/"]] I verified that I was able to get and store the bearer token correctly.

However, when I immediately after I try to run the ROhdsiWebApi::getCohortDefinitionsMetaData() function I get the following error:

image

Does anyone know what the problem could be?
Thanks in advance to anyone who can help me :smiley:

Vittoria

Have you tried executing your getCohortDefinitionsMetaData call immediately after the authoriseWebAPI call to generates the token? They expire very fast.

Yes, I call the getCohortDefinitionsMetadata function right after the authentication but still get the same error.
I also checked the expiration for the token in the WebAPI security settings but it hasn’t been changed from the default values.

t