# @dfinity/verifiable-credentials SDK

**URL:** <https://forum.dfinity.org/t/dfinity-verifiable-credentials-sdk/34486>\
**Category:** CDK\
**Created:** [August 26, 2024, 8:36am UTC](https://forum.dfinity.org/t/dfinity-verifiable-credentials-sdk/34486 "2024-08-26T08:36:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonath-z](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jonath-z/32/19753_2.png) [@Jonath-z](https://forum.dfinity.org/u/Jonath-z)\
**Post date:** [August 26, 2024, 8:36am UTC](https://forum.dfinity.org/t/dfinity-verifiable-credentials-sdk/34486/1 "2024-08-26T08:36:44Z")

</div>

Hi, I’m trying to test my VC issuer using `@dfinity/verifiable-credentials` on frontend, however the SDK does not seem to sends request on localhost, instead it’s sending the request to the ICP mainnet.

 ![Screenshot from 2024-08-26 10-24-14](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/4/1/4161173e654e75b18b0cc8fc89f2e1f186694a0a.png)

This is my how my `requestVerifiablePresentation` is constructed:

```js
    requestVerifiablePresentation({
      onSuccess: async (verifiablePresentation: VerifiablePresentationResponse) => {
        console.log({ verifiablePresentation });
      },
      onError() {
        console.log("An error occurred");
      },
      issuerData: {
        origin: "http://bkyz2-fmaaa-aaaaa-qaaaq-cai.localhost:4943",
        canisterId: Principal.fromText("bkyz2-fmaaa-aaaaa-qaaaq-cai"),
      },
      credentialData: {
        credentialSpec: {
          credentialType: `Verified ${name} completion`,
          arguments: {
            issuedOn,
            issuerName,
            linkToWork,
            recipientName,
            name,
          },
        },
        credentialSubject: Principal.fromText(principal),
      },
      identityProvider: new URL(IDENTITY_PROVIDER),
    });

```

---

<div class="post-metadata">

**Author:** ![Jonath-z](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jonath-z/32/19753_2.png) [@Jonath-z](https://forum.dfinity.org/u/Jonath-z)\
**Post date:** [August 26, 2024, 8:38am UTC](https://forum.dfinity.org/t/dfinity-verifiable-credentials-sdk/34486/2 "2024-08-26T08:38:45Z")

</div>

![Screenshot from 2024-08-26 10-38-24](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/4/0/400deb20e031ab58ec570f20ab82d5fad31521e1.png)

---

<div class="post-metadata">

**Author:** ![frederikrothenberger](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/frederikrothenberger/32/3826_2.png) [@frederikrothenberger](https://forum.dfinity.org/u/frederikrothenberger)\
**Post date:** [August 26, 2024, 11:17am UTC](https://forum.dfinity.org/t/dfinity-verifiable-credentials-sdk/34486/3 "2024-08-26T11:17:47Z")

</div>

Just for posterity: The problem here was that an II instance on mainnet was being used in conjunction with an issuer on localhost.

If the issuer is on localhost, II needs to be too. Otherwise the two canisters would have different root keys anyways, which would not work.

---

<div class="post-metadata">

**Author:** ![Jonath-z](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jonath-z/32/19753_2.png) [@Jonath-z](https://forum.dfinity.org/u/Jonath-z)\
**Post date:** [August 26, 2024, 2:39pm UTC](https://forum.dfinity.org/t/dfinity-verifiable-credentials-sdk/34486/4 "2024-08-26T14:39:57Z")

</div>

Thanks @frederikrothenberger I runned II on localhost, now working
