Hi everyone! I’m new to using http-functions and am unable to figure out how to get the data submitted by a third party.
Here’s my code (http-functions.js)
//Truecaller
export function use_TruecallerAuth ( request ) {
console . log ( request ) //Not getting what I should be getting
console . log ( response ) //[null]
let options = {
"headers" : {
"Content-Type" : "application/json"
}
}
**return** ok ( options )
}
The data is submitted by POST on https://www.syllabuzz.in/_functions/TruecallerAuth
I see something in Logs when the data is submitted but am unable to get what I expect.
The expected response I need (below the para.):
FROM THE DOCS OF 3rd PARTY-------
Once the user approves the verification on your app with their Truecaller profile ( by clicking the ‘Continue’ button on the dialog ), we will immediately post the user’s accessToken and the requestID to your Callback endpoint. The sample response format would look like below :
{"requestId":"RL8YZ41FQMt5Jiak2sc_Ys0OgQA=","accessToken":"a1asX--8_yw-OF--E6Gj_DPyKelJIGUUeYB9U9MJhyeu4hOCbrl","endpoint":"https://profile4-noneu.truecaller.com/v1/default"}
More info on how it’s submitted and the expected response is here (docs of 3rd party)
Thanks in advance!
Happy 2023!!