filings.zipFiling API question
“# search for the document first” in “fillings.py” (as below) works but error is returned by
"fileName, signedUrl = retrieveDocURL(docId)”
“retrieveSaveDoc(fileName, signedUrl) “ part is the same result.
[Error]
ValueError: Unable to get document URL. Code 403, Message: {"error":{"id":"bfe7676d-2be6-4667-8a82-19ea85b554bd","code":"insufficient_scope","message":"access denied. Scopes required to access the resource: [trapi.data.filings.retrieval]. Missing scopes: [trapi.data.filings.retrieval]","status":"Forbidden"}}
[Relevant part of the Program]
# search for the document first
print("Performing a document search using document-text...")
docId = requestSearch(documentSearchText)
print("Document ID is: %s " % str(docId))
# get a signed download link for this document
print("")
print("Retrieving the document URL for this DocID...")
fileName, signedUrl = retrieveDocURL(docId)
print("Document fileName is: %s" % fileName)
print("Retrieval signedUrl is: %s" % signedUrl)
# download the document
print("")
print("Downloading the document: %s..." % fileName)
retrieveSaveDoc(fileName, signedUrl)
Please advise what is wrong with the client?