Test Back end BP

Hi there, I have a problem with the hands on “Getting started with Back End”.

To be specific an endpoint

let api_key = event.api_key;
axios.defaults.headers.common[“Authorization”] = API ${api_key};
await axios.get(‘https://data.corva.ai/api/v1/data/corva/completion.wits/?skip=0&limit=1&query={“asset_id”:42606317}&sort={ “timestamp”: -1}’)

I got this error message:
Request failed with status code 403",“stack”:"Error: Request failed with status code 403 at createError (/opt/nodejs/node_modules/axios/lib/core/createError.js:16:15) at settle (/opt/nodejs/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd.

I was wondering if I was missing something else, but I reviewed that the “event.api_key” generated the next value:d6972aa1185773826d737e762f4e3483803954b57aa72e72

Can you confirm if we have access or permissions? or, What kind of issue can be?

1 Like

I’m also having the same problem.

On the log files I get the following.

2022-02-28T23:37:58.835Z b78250b8-2831-4487-95a6-eb6b607f87e7 INFO ASSET=48997394 AC=1227444 | {“err”:{“message”:“Request failed with status code 403”,“stack”:“Error: Request failed with status code 403 at createError (/opt/nodejs/node_modules/axios/lib/core/createError.js:16:15) at settle (/opt/nodejs/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/opt/nodejs/node_modules/axios/lib/adapters/http.js:322:11) at IncomingMessage.emit (events.js:326:22) at endReadableNT (_stream_readable.js:1241:12) at processTicksAndRejections (internal/process/task_queues.js:84:21)”,“config”:{“transitional”:{“silentJSONParsing”:true,“forcedJSONParsing”:true,“clarifyTimeoutError”:false},“transformRequest”:[null],“transformResponse”:[null],“timeout”:0,“xsrfCookieName”:“XSRF-TOKEN”,“xsrfHeaderName”:“X-XSRF-TOKEN”,“maxContentLength”:-1,“maxBodyLength”:-1,“headers”:{“Accept”:“application/json, text/plain, /”,“Authorization”:“API 19a1fc61cb276603836f7c60fbd67bc10dd5f309a31674b2”,“User-Agent”:“axios/0.26.0”},“method”:“get”,“url”:"https://data.corva.ai/api/v1/data/corva

1 Like

@Nehemias @Yuliya have you guys seen this before?

1 Like

Thanks Garrett, I just fixed it, I was missing the dataset.

Regards

1 Like