• 0

    posted a message on CurseForge API Issue

    You might need to create a curseforge support ticket for this.

    Posted in: General Discussion
  • 0

    posted a message on CurseForge API Issue

    In reply to 阿斯蘭:

     I did not run into issues with this. The only reason why I could see this happening is that you are sending the api request to www.cursforge.com instead of gamename.curseforge.com.

    Posted in: General Discussion
  • 0

    posted a message on CurseForge API Issue

    Wait I needed to make the changelog type just a string and dump the metadata as a string.

    Posted in: General Discussion
  • 0

    posted a message on CurseForge API Issue

    So I was wanting to automatically upload a file, to one of my projects, via the CurseForge API. I ran into an issue where it gave me the error code of:

    {'errorCode': 1002, 'errorMessage': 'Error in field `metadata`:\nInvalid JSON.'}

     

    Here is the metadata:

    {
      "changelog": "test",
      "changelogType": ["markdown"],
      "displayName": "API_TEST",
      "gameVersions": [8516],
      "releaseType": "release"
    }

     Request:

    requests.post(f"{URL_CURSEFORGE}/api/projects/{self.pack_info.curseforge_id}/upload-file",
                                       params={"token": MAIN_SETTINGS.curseforge},
                                       data={"metadata": self.metadata},
                                       files={"file": file})

     

    I am using python with the request library. Does anyone know why this would happen?

    Posted in: General Discussion
  • To post a comment, please or register a new account.