Skip to content
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

Getting error as "Invalid json in response body" #3

Open
yogesh-karpe opened this issue Sep 28, 2022 · 7 comments
Open

Getting error as "Invalid json in response body" #3

yogesh-karpe opened this issue Sep 28, 2022 · 7 comments

Comments

@yogesh-karpe
Copy link

yogesh-karpe commented Sep 28, 2022

Please refer following code.

const instance = new ondc.ONDC({ "host": "http://localhost:5000", "action": "search", "bapId": "ondc.gofrugal.com/ondc/18275", "bapUri": "https://ondc.gofrugal.com/ondc/seller/adaptor", "bppId": "ondc.yaarilabs.com", "bppUri": "https://ondc.yaarilabs.com/", "domain": "nic2004:60232", "country": "IND", "city": "std:080", "ttl": "PT30S", "key": "<encryption key>", "signingPublicKey" : "<signing key>", "privateKey" : "<private key>", "uniqueKey" : "<uniqueKey>", "subscriberId" : "<subscriberId>" });

let body = {
        "item": {
            "descriptor": {
                "name": "Milk"
            }
        },
        "fulfillment": {
            "end": {
                "location": {
                    "gps": "12.4535445,77.9283792"
                }
            }
        }
    };

instance.apiKey = await instance.createAuthorizationHeader(body);
let result = await instance.search(body);

@risabhsharma71
Copy link

@yogesh-karpe You need to run protocol server yourself or you can use the pilot one provided by ondc.

@amitsingh08
Copy link

Where are details of ondc's pilot server? or how do we get api credentials? Thanks @risabhsharma71 @yogesh-karpe @ukrocks007

@ukrocks007
Copy link
Owner

I have tried to get these details as well.
I had them when I was building the package but then that portal was closed.

@mshar899
Copy link

mshar899 commented Jun 2, 2023

@ukrocks007 Were you able to get the credentials of the pilot server? I need to start with implementing the app in real.

@yashb042
Copy link

yashb042 commented Jun 2, 2023

Following

@amitsingh08
Copy link

Pilot server urls and all tech-details:
https://github.com/ONDC-Official/developer-docs/tree/main

@yashb042
Copy link

yashb042 commented Jun 2, 2023

Does Beckn specifications now come under ONDC?
Does that mean we don't need to implement the protocol-servers(client and network side), and just the client side app (in my case it's BAP)
Is there any exhaustive documentation literally giving steps for implementing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants