Page 1 of 1
BEA API userID not authorized for retrieval
Posted: Sat Feb 22, 2020 8:10 am
by ThomasSmith58
i am a very light user of eviews but love the FRED database interface which i use quarterly do download the most up to date series i am interested in. i am trying to use the BEA interface data downloads but get the message "BEA API userID not authorized for retrieval" from eviews11 when i seek to browse the BEA dataset in eviews.
help! i have my 36 digit BEA key and have activated it with BEA. What do i do?
russ
Re: BEA API userID not authorized for retrieval
Posted: Mon Feb 24, 2020 11:39 am
by EViews Katerina
The first time you opened BEA,EViews asked you to enter the BEA API key in he preferences dialog :

- bea.png (9.42 KiB) Viewed 18617 times
To bring back this dialog:
1. Open the BEA database
2. On the database window click
View->Preferences...
3. Enter your API key and click OK
Try to Browse again and see the BEA datasets.
Re: BEA API userID not authorized for retrieval
Posted: Mon Feb 24, 2020 3:49 pm
by ThomasSmith58
thank you thank you thank you thank you !!
Re: BEA API userID not authorized for retrieval
Posted: Tue Feb 25, 2020 7:27 am
by ThomasSmith58
i am not able to import NIPA data series from BEA. I am able to import specific GDP series when i browse the BEA database so i am doing something right but the NIPA choices i get appear to be Table ID and Table Name. When i select (check) a particular line for the series i want, eviews appears to bring the table id "series" into its BEA window. This generates an error "invalid identifiers for object" when i attempt to copy the series to a workfile. Where is the NIPA data itself? How can i do the same steps for the GDP data and be successful? thanks for any insights.
Re: BEA API userID not authorized for retrieval
Posted: Wed Feb 26, 2020 12:19 pm
by EViews Katerina
We are going to have a fix on the next patch of EViews.
The problem with retrieving series from NIPA dataset is that data is returned unsorted by BEA and this is unexpected.
Re: BEA API userID not authorized for retrieval
Posted: Thu Feb 27, 2020 7:04 am
by ThomasSmith58
thanks for letting me know so quickly. hopefully the next patch will be soon!
Re: BEA API userID not authorized for retrieval
Posted: Mon May 11, 2020 6:27 am
by ThomasSmith58
i am struggling to codify an automatic download of BEA data. BLS and FRED appear to be much easier for me to code in. i am stuck at the code below. any help would be appreciated. Russ
dbopen(type=bea, server=
https://apps.bea.gov/api/data)
wfcreate m 1991 2020
fetch NIUNDERLYINGDETAIL__TABLENAME=U20405.SERIESCODE=DNDGRC.LINENUMBER=70.FREQUENCY=M.TABLEID=U20405
to which i get the following error...
Database Error: Bureau of Economic Analysis library error:
'Unexpected character encountered while parsing value: <.
Path '', line 0, position 0.' in "FETCH NIUNDERLYINGDETAIL__TA
BLENAME=U20405.SERIESCODE=DNDGRC.LINENUMBER=70.
FREQUENCY=M.TABLEID=U20405" on line 39.
thanks,
russ
Re: BEA API userID not authorized for retrieval
Posted: Mon May 11, 2020 12:42 pm
by EViews Katerina
The result of the fetch returns an error (Response size too large) since EViews is always fetching ALL years available from BEA.
We will have a fix in the next EViews patch:
1. Show the error as received from BEA.
2. Allow to add YEAR option at the end of the fetch to limit the results and allow fetch to continue.
I will let you know when fix is available.
Re: BEA API userID not authorized for retrieval
Posted: Fri May 15, 2020 11:56 am
by EViews Katerina
Latest patch of EViews 11 has a fix for this issue (Release date: 05-12-2020)
Re: BEA API userID not authorized for retrieval
Posted: Fri Jun 19, 2020 1:20 pm
by ThomasSmith58
i tried my hand at adding YEAR=2020 to the end of the code line but got rejected...
i entered the following:
dbopen(type=bea,server=
https://apps.bea.gov/api/data)
fetch NIUNDERLYINGDETAIL__TABLENAME=U20405.SERIESCODE=DNDGRC.LINENUMBER=70.FREQUENCY=M.TABLEID=U20405. Year=2020.
my error statement reads:
Database Error: Bureau of Economic Analysis library error: 'Index
was outside the bounds of the array.' in "FETCH
NIUNDERLYINGDETAIL__TABLENAME=U20405.
SERIESCODE=DNDGRC.LINENUMBER=70.FREQUENCY=M.
TABLEID=U20405. YEAR=2020." on line 33.
i have the feeling i'm close!
thanks,
russ
Re: BEA API userID not authorized for retrieval
Posted: Fri Jun 19, 2020 4:22 pm
by EViews Katerina
In your fetch command :
fetch NIUNDERLYINGDETAIL__TABLENAME=U20405.SERIESCODE=DNDGRC.LINENUMBER=70.FREQUENCY=M.TABLEID=U20405. Year=2020
there is a space before the Year : ". Year=2020"
Remove the white space and try again:
fetch NIUNDERLYINGDETAIL__TABLENAME=U20405.SERIESCODE=DNDGRC.LINENUMBER=70.FREQUENCY=M.TABLEID=U20405.Year=2020
Re: BEA API userID not authorized for retrieval
Posted: Sat Jun 20, 2020 6:11 am
by ThomasSmith58
It worked! Thank you so much. i love this software and great support!!!