BEA API userID not authorized for retrieval

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

ThomasSmith58
Posts: 7
Joined: Tue Jan 28, 2014 7:33 am

BEA API userID not authorized for retrieval

Postby ThomasSmith58 » Sat Feb 22, 2020 8:10 am

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

EViews Katerina
Posts: 51
Joined: Thu Jun 25, 2015 9:54 am

Re: BEA API userID not authorized for retrieval

Postby EViews Katerina » Mon Feb 24, 2020 11:39 am

The first time you opened BEA,EViews asked you to enter the BEA API key in he preferences dialog :
bea.png
bea.png (9.42 KiB) Viewed 18610 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.

ThomasSmith58
Posts: 7
Joined: Tue Jan 28, 2014 7:33 am

Re: BEA API userID not authorized for retrieval

Postby ThomasSmith58 » Mon Feb 24, 2020 3:49 pm

thank you thank you thank you thank you !!

ThomasSmith58
Posts: 7
Joined: Tue Jan 28, 2014 7:33 am

Re: BEA API userID not authorized for retrieval

Postby ThomasSmith58 » Tue Feb 25, 2020 7:27 am

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.

EViews Katerina
Posts: 51
Joined: Thu Jun 25, 2015 9:54 am

Re: BEA API userID not authorized for retrieval

Postby EViews Katerina » Wed Feb 26, 2020 12:19 pm

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.

ThomasSmith58
Posts: 7
Joined: Tue Jan 28, 2014 7:33 am

Re: BEA API userID not authorized for retrieval

Postby ThomasSmith58 » Thu Feb 27, 2020 7:04 am

thanks for letting me know so quickly. hopefully the next patch will be soon!

ThomasSmith58
Posts: 7
Joined: Tue Jan 28, 2014 7:33 am

Re: BEA API userID not authorized for retrieval

Postby ThomasSmith58 » Mon May 11, 2020 6:27 am

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

EViews Katerina
Posts: 51
Joined: Thu Jun 25, 2015 9:54 am

Re: BEA API userID not authorized for retrieval

Postby EViews Katerina » Mon May 11, 2020 12:42 pm

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.

EViews Katerina
Posts: 51
Joined: Thu Jun 25, 2015 9:54 am

Re: BEA API userID not authorized for retrieval

Postby EViews Katerina » Fri May 15, 2020 11:56 am

Latest patch of EViews 11 has a fix for this issue (Release date: 05-12-2020)

ThomasSmith58
Posts: 7
Joined: Tue Jan 28, 2014 7:33 am

Re: BEA API userID not authorized for retrieval

Postby ThomasSmith58 » Fri Jun 19, 2020 1:20 pm

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

EViews Katerina
Posts: 51
Joined: Thu Jun 25, 2015 9:54 am

Re: BEA API userID not authorized for retrieval

Postby EViews Katerina » Fri Jun 19, 2020 4:22 pm

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

ThomasSmith58
Posts: 7
Joined: Tue Jan 28, 2014 7:33 am

Re: BEA API userID not authorized for retrieval

Postby ThomasSmith58 » Sat Jun 20, 2020 6:11 am

It worked! Thank you so much. i love this software and great support!!!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests