Is there a way to use the stage API for an app --- for example, a Vue App, and use fetch('https://community-stage.mysite.com/restapi/v1/messages/id/12345?restapi.response_format=json') without using authentication?
When I was building the app, I had no problem hitting this URL. But now I get an error response,
error: {code: 101, message: "No message with the specified uid."}
But the uid exists.
Unsure if something changed or if there's a secret back door to hit the API or ...?
I believe I was using a CORS workaround plugin but even that doesn't do it anymore.
Thanks
@Inactive User ,
You can log support ticket to whitelist the IP from which you want to hit the stage url. Server IP which you share with the support will have the access to hit the API without htaccess
No, it can't be of localhost.
it should be of dedicated server.
Without authentication, you'll only be able to get public content. So if that message UID is in a private area that would otherwise require authentication, you won't be able to get it from the API without authentication.
Is stage considered a public area? I am still unable to hit the API and get results despite making it public.
Hi @Inactive User,
There's 2 things you could try in this situation:
1. Sign in to the API Gateway console at https://console.aws.amazon.com/apigateway
2. From the APIs navigation pane, choose Stages under an API.
3. From the Stages navigation pane, choose Create.
4. Under Create Stage, enter a stage name, for example, prod, for Stage name.
If you are not using credentials this error appears when you are trying to set the request validator in put and post method, to validate parameters, headers and body. In this case if I’m not wrong it will look for credentials on the header to refuse the request. To summarize, if you are not ready to provide credentials and want to keep them open, don’t enable that option in the request validator. I read on a reddit thread, that this method worked for someone. Unfortunately it was like 2 years ago, so now It is possible to not work. If you are a beginner in IT and want to create website you can use api scrapping with instant setup, to get very vast a part of code you need.
Welcome to the Technology board!
Curious about our platform? Looking to connect on social technology? You've come to the right place!