Added fix

This commit is contained in:
MOHAN 2026-03-20 18:16:02 +05:30
parent ceeb11c972
commit f967db62a2
4 changed files with 14 additions and 12 deletions

View File

@ -1,4 +1,4 @@
VITE_API_BASE_URL=
VITE_API_BASE_URL=https://api.veriflo.app
VITE_DEV_PROXY_TARGET=http://localhost:3000
# Marketing site config

View File

@ -15,7 +15,7 @@ const sdkCatalog = [
type: 'Official SDK',
install: 'npm install veriflo',
setupLanguage: 'javascript',
setup: `import Veriflo from 'veriflo'\n\nconst client = Veriflo.init(process.env.VERTIFLO_API_KEY)\n\nconst otpRequest = await client.sendOTP('+919999999999', {\n length: 6,\n expiry: 60,\n})`,
setup: `import Veriflo from 'veriflo'\n\nconst client = Veriflo.init(process.env.VERIFLO_API_KEY)\n\nconst otpRequest = await client.sendOTP('+919999999999', {\n length: 6,\n expiry: 60,\n})`,
packageUrl: 'https://www.npmjs.com/package/veriflo',
packageLabel: 'npm package',
downloadUrl: '/downloads/veriflo-node-starter.js',
@ -23,7 +23,7 @@ const sdkCatalog = [
notes: [
'Best choice for Express, Next.js, NestJS, and serverless Node runtimes.',
'Includes the cleanest setup for send, verify, and resend flows.',
'Use your API key from the dashboard as VERTIFLO_API_KEY.',
'Use your API key from the dashboard as VERIFLO_API_KEY.',
],
},
{
@ -32,7 +32,7 @@ const sdkCatalog = [
type: 'Official SDK',
install: 'pip install veriflo',
setupLanguage: 'python',
setup: `from veriflo import Veriflo\nimport os\n\nclient = Veriflo(api_key=os.environ['VERTIFLO_API_KEY'])\n\nresult = client.send_otp('+919999999999', length=6, expiry=60)`,
setup: `from veriflo import Veriflo\nimport os\n\nclient = Veriflo(api_key=os.environ['VERIFLO_API_KEY'])\n\nresult = client.send_otp('+919999999999', length=6, expiry=60)`,
packageUrl: 'https://pypi.org/project/veriflo',
packageLabel: 'PyPI package',
downloadUrl: '/downloads/veriflo-python-starter.py',
@ -49,7 +49,7 @@ const sdkCatalog = [
type: 'REST Starter',
install: 'No SDK required. Use built-in cURL support or your preferred HTTP client.',
setupLanguage: 'php',
setup: `<?php\n\n$apiKey = getenv('VERTIFLO_API_KEY');\n$payload = json_encode([\n 'phone' => '+919999999999',\n 'otpLength' => 6,\n]);`,
setup: `<?php\n\n$apiKey = getenv('VERIFLO_API_KEY');\n$payload = json_encode([\n 'phone' => '+919999999999',\n 'otpLength' => 6,\n]);`,
packageUrl: 'https://api.veriflo.app/v1/otp/send',
packageLabel: 'REST endpoint',
downloadUrl: '/downloads/veriflo-php-starter.php',
@ -66,7 +66,7 @@ const sdkCatalog = [
type: 'REST Starter',
install: 'No SDK required. Uses the Go standard library net/http package.',
setupLanguage: 'go',
setup: `package main\n\nimport (\n \"bytes\"\n \"net/http\"\n \"os\"\n)\n\nfunc main() {\n apiKey := os.Getenv(\"VERTIFLO_API_KEY\")\n _ = apiKey\n}`,
setup: `package main\n\nimport (\n \"bytes\"\n \"net/http\"\n \"os\"\n)\n\nfunc main() {\n apiKey := os.Getenv(\"VERIFLO_API_KEY\")\n _ = apiKey\n}`,
packageUrl: 'https://api.veriflo.app/v1/otp/send',
packageLabel: 'REST endpoint',
downloadUrl: '/downloads/veriflo-go-starter.go',
@ -83,7 +83,7 @@ const sdkCatalog = [
type: 'REST Starter',
install: 'No SDK required. Uses Ruby standard libraries plus JSON.',
setupLanguage: 'ruby',
setup: `curl -X POST https://api.veriflo.app/v1/otp/send \\\n+ -H \"Authorization: Bearer \${VERTIFLO_API_KEY}\" \\\n+ -H \"Content-Type: application/json\" \\\n+ -d '{\"phone\":\"+919999999999\",\"otpLength\":6}'`,
setup: `curl -X POST https://api.veriflo.app/v1/otp/send \\\n+ -H \"Authorization: Bearer \${VERIFLO_API_KEY}\" \\\n+ -H \"Content-Type: application/json\" \\\n+ -d '{\"phone\":\"+919999999999\",\"otpLength\":6}'`,
packageUrl: 'https://api.veriflo.app/v1/otp/send',
packageLabel: 'REST endpoint',
downloadUrl: '/downloads/veriflo-ruby-starter.rb',
@ -100,7 +100,7 @@ const sdkCatalog = [
type: 'REST Starter',
install: 'No SDK required. Uses Java HttpClient from the standard JDK.',
setupLanguage: 'java',
setup: `HttpRequest request = HttpRequest.newBuilder()\n .uri(URI.create(\"https://api.veriflo.app/v1/otp/send\"))\n .header(\"Authorization\", \"Bearer \" + System.getenv(\"VERTIFLO_API_KEY\"))\n .header(\"Content-Type\", \"application/json\")\n .build();`,
setup: `HttpRequest request = HttpRequest.newBuilder()\n .uri(URI.create(\"https://api.veriflo.app/v1/otp/send\"))\n .header(\"Authorization\", \"Bearer \" + System.getenv(\"VERIFLO_API_KEY\"))\n .header(\"Content-Type\", \"application/json\")\n .build();`,
packageUrl: 'https://api.veriflo.app/v1/otp/send',
packageLabel: 'REST endpoint',
downloadUrl: '/downloads/veriflo-java-starter.java',
@ -117,7 +117,7 @@ const sdkCatalog = [
type: 'HTTP Starter',
install: 'No SDK required. Works anywhere you can issue HTTPS requests.',
setupLanguage: 'bash',
setup: `curl -X POST https://api.veriflo.app/v1/otp/send \\\n+ -H \"Authorization: Bearer \${VERTIFLO_API_KEY}\" \\\n+ -H \"Content-Type: application/json\" \\\n+ -d '{\"phone\":\"+919999999999\",\"otpLength\":6}'`,
setup: `curl -X POST https://api.veriflo.app/v1/otp/send \\\n+ -H \"Authorization: Bearer \${VERIFLO_API_KEY}\" \\\n+ -H \"Content-Type: application/json\" \\\n+ -d '{\"phone\":\"+919999999999\",\"otpLength\":6}'`,
packageUrl: 'https://api.veriflo.app/v1/otp/send',
packageLabel: 'REST endpoint',
downloadUrl: '/downloads/veriflo-curl-starter.sh',
@ -504,7 +504,7 @@ function SDKs({ activeSdk, setActiveSdk }) {
<div className="flex flex-col gap-3">
{[
'Install the package or choose the REST starter file.',
'Save your API key as VERTIFLO_API_KEY in your environment.',
'Save your API key as VERIFLO_API_KEY in your environment.',
'Use the send endpoint first, then wire verify and resend flows.',
'Keep rate limits in mind while testing send and resend behavior.',
].map((item) => (
@ -580,3 +580,4 @@ function RateLimits() {
</DocSection>
)
}

View File

@ -348,7 +348,7 @@ export default function MessageConfig() {
))}
</div>
<p className="text-[11px] text-text-secondary font-bold px-1 mt-3 mb-0 leading-5">
The final WhatsApp message must stay within the max character count defined by `VERTIFLO_MESSAGE_TEMPLATE_MAX_CHARS` in your backend `.env`.
The final WhatsApp message must stay within the max character count defined by `VERIFLO_MESSAGE_TEMPLATE_MAX_CHARS` in your backend `.env`.
</p>
</div>
</div>
@ -522,3 +522,4 @@ export default function MessageConfig() {
</div>
)
}

View File

@ -2,7 +2,7 @@ import axios from 'axios';
import { clearAuthSession, getAuthToken } from '../utils/authSession';
const configuredBaseUrl = import.meta.env.VITE_API_BASE_URL?.trim();
const baseURL = configuredBaseUrl || '/';
const baseURL = configuredBaseUrl || 'https://api.veriflo.app';
const api = axios.create({
baseURL,