0xPolygonID/issuer-node

Create claim API (/v1/{identifier}/claims)

Closed this issue · 5 comments

Expected behaviour

Should be able to create claims

Actual behaviour

Even though I'm entering a valid identifier, I'm always getting the response as "message": "input does not begin with 'did:' prefix"

Steps to reproduce the problem

  1. Clone the repo, set up the valid env variables and open localhost:3001
  2. Under create claim API, enter an identifier and try to hit the API.

System information

Issuer node version: 20.20.0
OS & Version: Mac OS
Browser & Version: Chrome

Logs (if needed)

[logs]

When submitting logs, please submit them as text and not as screenshots.

Could you share an example payload so we can reproduce the issue you're hitting?

I don't think issue is with the request payload, it is with the path parameter. I'm giving "did:polygonid:polygon:mumbai:2qFQa2tdn8oxUsZH1ZCFF6j6BWkFi9e5ndiURf8oNU" as the identifier.

Anyways, as you've asked it, here is the request payload :

{
  "credentialSchema": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/KYCAgeCredential-v3.json",
  "type": "KYCAgeCredential",
  "credentialSubject": {
    "id": "fill with did",
    "birthday": 19960424,
    "documentType": 2
  },
  "expiration": 1903357766
}

Are you filling the DID or using the demo payload "id": "fill with did"?

Oh! my bad. Somehow I haven't seen it. Thanks for the help though.

No worries, it happens to the best of us! I'm glad we could figure it out.

If you run into any more issues or have any questions, feel free to reach out. Happy coding!