-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate OTP error #388
Comments
@manovasanth1227 If you are trying to get OTP using Public APIs, then your request should be like this - curl -X POST "https://cdn-api.co-vin.in/api/v2/auth/public/generateOTP" -H "accept: application/json" -H "Content-Type: application/json" -d "{"mobile":"9876543210"}" Thanks, |
const res = await fetch(RECIEVEOTPURL, { now i replaced what you said but I'm getting same error |
Same thing happened to me |
Hey @manovasanth1227 Here is the Working Code For Public And Protected API Generation Using Request In Nodejs. Hope This Help You //Public API OTP GENERATION var request = require('request'); }; //Private Protected API OTP GENERATION }; |
const OTPGENERATEURL =
"https://cdn-api.co-vin.in/api/v2/auth/public/generateOTP";
const data = {
mobile: **********,
secret:
"U2FsdGVkX1/JL3gfdhdxA7QIYB9xxdXiQd1Mz4frcbUdcoA+q44cPIOD+EZ/mQTKKRQ5jWl6KDmqgDbdgfTadA==",
};
let res = await fetch(OTPGENERATEURL, {
mode: "no-cors",
method: "post",
Im getting error in browser as : POST https://cdn-api.co-vin.in/api/v2/auth/public/generateOTP net::ERR_ABORTED 400
The text was updated successfully, but these errors were encountered: