Api_create and plotly_POST not working after update

I had previously used this code to post to plotly:

g<-plot_ly(g)
temp<-plotly_POST(g,filename=“x”)

where g with
class(g)
[1] “plotly” “htmlwidget”

I’ve been getting this error since the last R update:

Error: ‘http_error’ is not an exported object from 'namespace:httr’
In addition: Warning message:
‘plotly_POST’ is deprecated.
Use ‘api_create’ instead.
See help(“Deprecated”)

And the first line remains when I try api_create:
Error: ‘http_error’ is not an exported object from ‘namespace:httr’

Any ideas on how I can get rid of this error?

Now I’m getting:

Error: Client error: (401) Unauthorized
_ Bad API key_

Can it be because of the httr version (1.1.0) I’m using?

I cannot update because new versions are not compatible with birquery.