Ready to use cors.sh? select your plan and let’s create your first
project.
you can update the fields later
You may now close this page
{JSON.stringify(props, null, 2)}
>
);
}
export async function getServerSideProps(context: any) {
const { code, state } = context.query;
try {
// TODO:
const { data } = await client.get("/access_token", {
params: {
client_id: "cors.sh",
client_secret: process.env.GRIDA_OAUTH_CLIENT_SECRET,
code,
},
});
return {
props: {
...data,
},
};
} catch (e) {
console.error(e);
}
return {
props: {},
};
}
================================================
FILE: .archives/homepage/pages/onboarding/[id].tsx
================================================
// TODO: rename this route to /onboarding/continue?id=
import Head from "next/head";
import React from "react";
export default function ContinueOnboardingWithVerification() {
return (
<>
We've sent you an email with the api key.
Please check your inbox :)
Let’s get rid of the cors errors with proxy.cors.sh like below.
// GET https://proxy.corsh.sh/https://instragram.com/posts/123 ////
// -h x-cors-api-key {apikey} //
{message}
Copy the data below when you contact customer support
session: {session}
application: {application.id} ({application.name})
You can now create as many project you want without unlimited hourly
rate :)
Let’s finish up your first project.
This is a React page
API Keys
# for testing
# for production
{{CODE}}
fetch('https://proxy.cors.sh/https://acme.com', {
headers: {
'x-cors-api-key': '{{CODE}}'
}
})
# for testing
{{CODE_TEST}}
# for production
{{CODE_LIVE}}
fetch('https://proxy.cors.sh/https://acme.com', {
headers: {
'x-cors-api-key': '{{CODE_TEST}}'
}
})
|
|
|
|