RblDataLicense icon indicating copy to clipboard operation
RblDataLicense copied to clipboard

"No definition of jwt found in header or query string" error

Open DavideMagno opened this issue 2 years ago • 1 comments

Hi,

I am following the README of the package.I first connect using the webservice (not the SFTP)

library('RblDataLicense')

RblConnect(user = Sys.getenv("BLP_USER"), 
pw = Sys.getenv("BLP_PASSWORD"), 
host = "api.bloomberg.com/eap/notifications/sse", 
protocol = "https") 

which returns me

TRUE

Then I build the dummy request as follows:

RblRequest <- 
    RblRequestBuilder(
        header = c(FIRMNAME = RblUser(),
                   PROGRAMNAME = 'gethistory',
                   DATERANGE = '20050101|20151231'),
        fields = c('PX_LAST'),
        identifiers = c('SXXE Index')
    )

when I do

cat(RblRequest)

it returns

START-OF-FILE
FIRMNAME=f7f0b8f9989c6cce7676fbcd891ea2a9
PROGRAMNAME=gethistory
DATERANGE=20050101|20151231

START-OF-FIELDS
PX_LAST
END-OF-FIELDS

START-OF-DATA
SXXE Index
END-OF-DATA

END-OF-FILE

then I proceed with

req <- RblUpload(RblRequest)

and I get the error:

Uploading file Rbl_1122205655.req
{"errors":[{"title":"unauthorized_client","id":"0bff2dbc-6a44-48e7-c8fe-d1d9c91db0cc","meta":{"server-time":1700686615},"errorCode":"unauthorized-client","status":401,"detail":"No definition of jwt found in header or query string."}],"error_description":"No definition of jwt found in header or query string.","error":"unauthorized_client"}
Successfully uploaded file Rbl_1122205655.req

How can I fix it? Does it have to do with webservice connection?

Cheers, Davide

DavideMagno avatar Nov 22 '23 21:11 DavideMagno

Hi, unfortunately I am unable to replicate this. Having RblConnect returning TRUE and RblUpload raising an error is strange. You may try to update the package RCurl that actually implements the file upload. Specifically, RblUpload uses ftpUpload internally

eguidotti avatar Nov 27 '23 16:11 eguidotti

Closing for inactivity

eguidotti avatar Aug 21 '24 10:08 eguidotti