api

Can someone help with this api fetching its not working
No description
No description
5 Replies
Jochem
Jochem9mo ago
the error you're getting is a 401 Unauthorized error. That means you will have to provide some kind of credentials or token in your request
soha.rehman
soha.rehman9mo ago
how to fix that ?
Jochem
Jochem9mo ago
that depends on the API you're calling. It's localhost, so I assume it's something you wrote yourself?
soha.rehman
soha.rehman9mo ago
yes
Jochem
Jochem9mo ago
what does the code running at /mentors look like? if you can, just copy/paste the code into a codeblock (```js on its own line to start, then your code, then ``` on a new line at the bottom)