Complete Signup

How to complete signup a user through the CoSync REST API #

Complete the signup user account with a verification code. This function will cause the CoSync Auth portal to verify a six digit verification code with the user handle for verification. If the code passed matches the code in the Signup record, the handleVerified flag will be set to true. This function is only used if the signup flow for the application is set to code.

This call will return a JWT token for the signed up user, and an access token for REST calls.

This call is only made by an application with a signup flow of code.

URL #
/api/appuser/completeSignup
Method #
POST
Headers #
app-token: "<App Token>"
Data Parameter #
    {
        handle: "<user handle>",
        code: "<verification code>"
    }

Response: #

Success: #

StatusCode: #
    200 (OK)
Contents: #
    {
        jwt: "<JWT for logged in user>",
        access-token: "<access token for user>"
    }

Error: #

StatusCode: #
    400 (BAD REQUEST)
    500 (INTERNAL SERVER ERROR)
Content: #
    {
        code: "<internal error code>",
        message: "<readable error description>"
    }

The internal codes are integers:

  • 400 - invalid app token
  • 401 - app no longer exists
  • 402 - app is suspended
  • 403 - missing parameter
  • 404 - user account is suspended
  • 407 - app does not support signup
  • 411 - signup code expired
  • 413 - app is migrated
  • 500 - internal server error
  • 601 - handle already registered
  • 602 - invalid data
  • 611 - apple account already exist
  • 612 - google account already exist