Missing "X-Application-Data" request header - jiomartplaypitcompany.jiox1.de

Missing “X-Application-Data” Request HttpHeader in https://jiomartplaypitcompany.jiox1.de/api/service/application/cart/v1.0/detail?area_code=400001&b=true&i=true

X-Application-Data is supposed to come with application id, token and company id etc. [ For example {“_id”:“64b002e1386bae58f856f06d”,“token”:“sfq7J47X5”,“company_id”:“4”}]

It is not possible to proxy the get_cart request, without “X-Application-Data”. Can we get this fixed at the earliest?

sendOTPOnMobile API is only available in ApplicationClient API and not available in PlatformClient API.

Getting an instance for an ApplicationClientAPI requires applicationId and appToken.

Hence development of ResendOTP JioMart Extension is heavily depends on the availability of “X-Application-Data” Http Request Header.

Hello @Pitchaimani

Could you please try using the ‘sendOtp’ platform API and check if it meets your requirements?
For that, you will need to pass:

companyId: "<COMPANY_ID>",
apiKey: "<API_KEY>", 
apiSecret: "<API_SECRET>"

This is a platform SDK API to send OTPs via email and SMS:

const { PlatformConfig, PlatformClient } = require("@gofynd/fdk-client-javascript");

let platformConfig = new PlatformConfig({
  companyId: "<COMPANY_ID>",
  apiKey: "<API_KEY>", 
  apiSecret: "<API_SECRET>"
});

platformConfig.oauthClient.setToken(token);

const platformClient = new PlatformClient(platformConfig);
const response = await platformClient.application("<APPLICATION_ID>").communication.sendOtp({
  "body": {
    "data": {
      "send_same_otp_to_channel": false,
      "mobile": "value",
      "country_code": "value",
      "to": "value"
    },
    "sms": {
      "otp_length": 0,
      "expiry": 0,
      "template": {
        "key": "value",
        "value": {}
      },
      "provider": {
        "slug": "value",
        "_id": "value"
      }
    },
    "email": {
      "otp_length": 0,
      "expiry": 0,
      "template": {
        "key": "value",
        "value": {}
      },
      "provider": {
        "slug": "value",
        "_id": "value"
      }
    }
  }
});

Link for your reference: Send OTP using email and sms | Fynd Partners Help Center

@afrozshaikh - I hope, the requirement was mis-understood.

I am developing an extension, which needs to proxy

  1. get cart api
  2. resendotp api

These api’s will be consumed by Web Browser and Mobile Applications.

My Extensions to proxy these requests needs the “X-Application-Data” request header from Web Browser and Mobile Application [ which is missing now]. Hence raised this ticket.

Note: JCP Core FDK is expected to send the “X-Application-Data” for every api request initiated from Web Browser and Mobile Application, which is missing now.

Expected Data to be present in X-Application-Data are as follows:

companyId: "<COMPANY_ID>",
apiKey: "<API_KEY>", 
apiSecret: "<API_SECRET>"

Hope this helps

could you please specify the fdk method you are using here? The fdk methods are supposed to call the apis, apis should not be called directly.

can we have the call today?

I am not sure, which FDK function should be invoked for proxy the api calls exposed via Extension.

Just one example [ from wallet case ]:

https://jiomartplaypitcompany.jiox1.de/ext/wallet/customer/scbalance

This API is called from Web Browser to invoke the api exposed from an extension. Even in this API call, we dont see the X-Application-Data !!!

Sure, please share your availability, have pinged you on slack and teams.

{
“application”: {
“_id”: “64b002e1386bae58f856f06d”,
“name”: “JioMart - Dev Env”,
“description”: “India’s online shopping destination for Mobiles, Electronics, Grocery, Fashion, Home & Kitchen, Furniture, Jewellery, Beauty, and more. Great Offers. Low Prices. Easy Returns. Pay on Delivery.”,
“logo”: {
“secure_url”: "https://cdn.pixelbin.io/v2/jiomart-fynd/jio-np/wrkr/jmrtz0/company/4/applications/64b002e1386bae58f856f06d/application/pictures/free-logo/original/LXMzeY_eh-JioMart-PlayPit-Company.png"
},
“favicon”: {
“secure_url”: "https://cdn.pixelbin.io/v2/jiomart-fynd/jio-np/wrkr/jmrtz0/company/4/applications/64b002e1386bae58f856f06d/application/pictures/favicon/original/-KBNY7Ihw-JioMart-PlayPit-Company.png"
},
“banner”: {
“secure_url”: "https://cdn.pixelbin.io/v2/jiomart-fynd/jio-np/wrkr/jmrtz0/company/4/applications/64b002e1386bae58f856f06d/application/pictures/landscape-banner/original/-jq49sMY7-JioMart-PlayPit-Company.png"
},
“owner”: “c3d6c0dddf87cf00f870d853”,
“domains”: [
{
“name”: “jiomartplaypitcompany.jiox1.de”,
“verified”: true,
“is_primary”: true,
“is_shortlink”: true,
“_id”: “64b002e1386bae58f856f06e”
}
],
“company_id”: 4,
“channel_type”: “website-and-mobile-apps”,
“cors”: {
“domains”: [

]
},
“cache_ttl”: -1,
“auth”: {
“enabled”: true
},
“internal”: false,
“is_active”: true,
“mode”: “live”,
“status”: “active”,
“token”: “sfq7J47X5”,
“tokens”: [
{
“token”: “sfq7J47X5”,
“created_at”: “2023-07-13T13:57:53.921Z”
}
],
“redirections”: [

],
“created_at”: “2023-07-13T13:57:53.921Z”,
“modified_at”: “2023-11-06T11:26:04.001Z”,
“slug”: “jiomart-playpit-company-h2q-30”,
“__v”: 8,
“mobile_logo”: {
“secure_url”: "https://cdn.pixelbin.io/v2/jiomart-fynd/jio-np/wrkr/jmrtz0/company/4/applications/64b002e1386bae58f856f06d/application/pictures/free-logo/original/LXMzeY_eh-JioMart-PlayPit-Company.png"
},
“domain”: {
“name”: “jiomartplaypitcompany.jiox1.de”,
“verified”: true,
“is_primary”: true,
“is_shortlink”: true,
“_id”: “64b002e1386bae58f856f06e”
}
},
“routes”: [
{
“path”: “/”,
“upstream”: “mirage”,
“default”: true,
“priority”: 0
}
]
}

This issue is resolved now. Thanks @Himanshi_Agrawal