> For the complete documentation index, see [llms.txt](https://magicweaver-inc.gitbook.io/magicweaver/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://magicweaver-inc.gitbook.io/magicweaver/api-error-code.md).

# API Error Code

API error code and its correspondent solution suggestion

Sign in and sign up error codes.

| API                                                            | Code | Message                                                                   | Explain                                                                |
| -------------------------------------------------------------- | ---- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| general                                                        | 1000 | success                                                                   |                                                                        |
| sign\_in/sign\_up                                              | 1001 | email/user\_id or password is missing                                     | No email, user id or password.This function is only for MW users.      |
| sign\_in/sign\_up                                              | 1002 | mw\_x\_jwt is missing, use jsonbody form instead                          | Cannot find mw-x-jwt                                                   |
| sign\_in/sign\_up                                              | 1003 | Failed to decode \[partner]'s MW\_X\_JWT                                  | Cannot decode partner infomation from mw-x-jwt                         |
| sign\_in                                                       | 1104 | The user doest not exist. Please sign up.                                 | User was not registered yet, please register                           |
| sign\_in                                                       | 1105 | Please go to your user\_id to confirm this account.                       | Need to confirm your account, this function is only for MW users.      |
| sign\_in                                                       | 1106 | Wrong password. Please try again.                                         | This function is only for MW users.                                    |
| sign\_in/sign\_up                                              | 1107 | no secretkey for {partner}                                                | Please contact MW for this case                                        |
| sign\_in/sign\_up                                              | 1108 | Undefined token type: {token\_type}                                       | token\_type was undefined                                              |
| sign\_up                                                       | 1201 | User \[{user\_id}] already exists in MW database.                         |                                                                        |
| sign\_up                                                       | 1202 | failed to create item in user\_partner table                              |                                                                        |
| sign\_up                                                       | 1203 | user already exist with this user\_id\[{ user\_id }].                     |                                                                        |
| sign\_up                                                       | 1204 | Failed to send confirmation email                                         | This function is only for MW users.                                    |
| sign\_up                                                       | 1205 | Failed to confirm user account, please contact MW                         | This function is only for MW users.                                    |
| authenticate                                                   | 1301 | JWT string is None when authentificate.                                   |                                                                        |
| authenticate                                                   | 1302 | Failed to get partner from JWT token.                                     |                                                                        |
| authenticate                                                   | 1303 | Failed to get secret key for partner, please contact mw                   |                                                                        |
| authenticate                                                   | 1304 | Could not authenticate user from JWT                                      |                                                                        |
| authenticate                                                   | 1305 | Your current session is expired. Please sign in again.                    |                                                                        |
| authenticate                                                   | 1306 | error to authorize                                                        |                                                                        |
| <p>create\_profile/</p><p>get\_measurements etc</p>            | 1307 | The user\[{user\_id}] associated with Partner\[{partner}] does not exist. | no certain user under given partner                                    |
| <p>get\_measurement/</p><p>get\_profile\_photo\_by\_id etc</p> | 1308 | user\_id \[] profile\_id\[] not exist                                     | profile not exist under this account, or profile id input is not valid |
| check\_sdk                                                     | 2301 | client id {} does not exist, please contact MagicWeaver                   | only applies to SDK partners                                           |
| check\_sdk                                                     | 2302 | client id {} does not match with the api\_key {}                          | only applies to SDK partners                                           |

Profile related error code, such as create\_profile/update\_profile etc

| API                                                                                               | Code | Message                                                             | Explain                                                                                   |
| ------------------------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| <p>create\_profile/</p><p>update\_profile/</p><p>get\_measurements/</p><p>update\_measurement</p> | 2102 | Failed to get json data from input                                  | json is None, please check json input                                                     |
| <p>create\_profile/</p><p>update\_profile</p>                                                     | 2103 | json error happened                                                 |                                                                                           |
| create\_profile                                                                                   | 2104 | Failed to create profile dict                                       | please check if the key of the profile dict is correct                                    |
| create\_profile                                                                                   | 2105 | front or side photo is missing                                      |                                                                                           |
| create\_profile                                                                                   | 2106 | Failed to upload photo to s3                                        |                                                                                           |
| create\_profile                                                                                   | 2107 | Fail to create dictionary of parameters.                            |                                                                                           |
| create\_profile                                                                                   | 2108 | Failed to write temporary parameters file                           |                                                                                           |
| create\_profile                                                                                   | 2109 | Failed to add a new profile to database                             |                                                                                           |
| <p>update\_profile/</p><p>update\_measurements</p>                                                | 2110 | The input parameters have no \[profile]. \[profile] key is missing  |                                                                                           |
| update\_profile                                                                                   | 2111 | Failed to update profile                                            |                                                                                           |
| update\_profile                                                                                   | 2121 | Failed to delete the profile                                        |                                                                                           |
| update\_profile                                                                                   | 2122 | Profile doesn't exist                                               |                                                                                           |
| update\_measurement                                                                               | 2131 | The input json has no \[measurements] key                           |                                                                                           |
| update\_measurement                                                                               | 2132 | Failed to update measurements                                       |                                                                                           |
| get\_3d\_models\_by\_profile\_id/ etc                                                             | 2201 | Unauthorized Access. Please contact MagicWeaver                     |                                                                                           |
| get\_3d\_models\_by\_profile\_id                                                                  | 2202 | Could not download the model file from the profile during authorize |                                                                                           |
| get\_3d\_models\_by\_profile\_id                                                                  | 2203 | Invalid 3d model file format, Please contact MagicWeaver            |                                                                                           |
| get\_3d\_models\_by\_profile\_id                                                                  | 2204 | Failed to fetch model file location                                 |                                                                                           |
| get\_3d\_models\_by\_profile\_id                                                                  | 2205 | Missing parameter: model\_file                                      |                                                                                           |
| get\_3d\_models\_by\_profile\_id                                                                  | 2206 | Failed to save 3D model file due to:                                |                                                                                           |
| get\_3d\_models\_by\_profile\_id                                                                  | 2207 | There is no \[%s] 3D model file                                     |                                                                                           |
| show\_3d\_models\_in\_js\_viewer\_by\_profile\_id                                                 | 2205 | Illegal access due to the invalid MW-JWT                            |                                                                                           |
| get\_measurement                                                                                  | 2220 | The measurement data is still in progress. Not ready yet.           |                                                                                           |
| get\_measurement                                                                                  | 2221 | required parts param has to be a list                               |                                                                                           |
| get\_measurement                                                                                  | 2222 | Failed to retrieve measurements                                     |                                                                                           |
| get\_measurement                                                                                  | 2223 | Failed to show measurements                                         |                                                                                           |
| get\_profile\_photos\_by\_id                                                                      | 2250 | invalid profile                                                     | no such profile under such user                                                           |
| list\_profiles                                                                                    | 2301 | List\_profile: Invalid request parameter(required)                  | <p>request type must be the following: </p><p>app\_list， name\_only，id\_only，name\_id</p> |
| list\_profiles                                                                                    | 2302 | Failed to list profiles                                             |                                                                                           |
| list\_profile                                                                                     | 2303 | profile is skipped or deleted                                       |                                                                                           |
