POST /api/users/completeSignup

Registers the user, so that the user can log in and perform authenticated actions. Use this operation, which offers extended functionality, rather than the pre-existing operation, POST /api/users/completeSignup (with different headers).

Before: The user clicks the signup code in the notification email, and then puts in the password. Those actions serve to validate the user input; processing of the new user registration can now be completed by means of the completeSignup operation.

After: When this operation is complete, the user is logged in and can begin using the Akana API Platform.

This operation can be used in two ways:

  • The operation sends a signup code from a signup email.
  • The operation sends no signup code (signupCode=). In this case, the currently authenticated third-party user (for example, a Google or Facebook user) will be used to complete the authentication process.

After a successful call, any subsequent attempt to sign up using the same email address results in an error.

Authorization Roles/Permissions: Anyone can use this operation; login is not required. This is because the operation is used in the signup process.

This topic includes the following sections:

HTTP Method

POST

Back to top

URL

https://{hostname}/api/users/completeSignup

Back to top

Sample Request

The example below shows a request to complete the signup and log the user into the developer portal user interface.

Request URL

https://{hostname}/api/users/completeSignup

Sample request headers

Accept: application/json, text/javascript, */*; q=0.01
Content-Type: application/json

Sample request body

{
  "FirstName":"Jane",
  "LastName":"Mead",
  "EmailAddress":"janemead@acmepaymentscorp.com",
  "Password":"mypassword",
  "SignupCode":"16odWl-Q8wL4O-tGiapZLvVlREP78ygr_TL4fnZ9r3WJofNo0--Ya6imw8AzWmyXxzbU8kQBnGXIsELcnfnbLfn0YpqnwD8iQ2Z6Hm8tT8uVERHVgxZE1joFhMI",
  "CountryCode":"US",
  "PhoneNumber":"1234567888",
  "classifiers":{
    "name":[
      ""
    ],
    "version":[
      ""
    ],
    "description":[
      ""
    ],
    "status":[
      "Initial"
    ],
    "pii":[
      "true"
    ],
    "funding-date":[
      ""
    ],
    "implementation-cost":[
      ""
    ],
    "api-layer":[
      "Business"
    ]
  },
  "artifacts":{
    "wiki-site":"http://www.wiki.acmepaymentscorp.com"
  }
}

Back to top

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept application/json, application/vnd.soa.v84+json
Content-Type application/json, application/vnd.soa.v84+json

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
completeSignUpUser Body completeSignUpUser Required Contains information about a user signing up for the API platform.

Back to top

Response

If successful, this operation returns HTTP status code 200, with information about the new user, including the assigned UserID.

Back to top

Sample Response

The sample response below shows that the operation was successful. The signup steps are now complete for the new user, and the user is logged in to the platform.

Sample response headers: application/json

Status Code:200 OK
Content-Type: application/json
Set-Cookie:AtmoAuthToken_acmepaymentscorp=TokenID...

Sample response body: application/json

{
  "state" : "registered",
  "loginState" : "login.complete",
  "authIdentifier" : "",
  "domainName" : "Local Domain",
  "userName" : "JaneMead",
  "authTokenValidUntil" : "2017-05-02T19:52:24.699Z",
  "lastName" : "Mead",
  "firstName" : "Jane",
  "profileName" : "JaneMead",
  "loginDomainID" : "siteusers.atmosphere",
  "userPhones" : {
    "UserPhone" : [ ]
  },
  "userID" : "7ddb1d70-d4e6-463d-9346-5743060ad342.acmepaymentscorp",
  "emailAddress" : "janemead@acmepaymentscorp.com",
  "expired" : false
}

Back to top

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type application/json, application/vnd.soa.v84+json

Back to top

Response Body

Name Type Description
SignupResponse SignupResponse Contains basic signup information about the user, including the unique user ID assigned by the platform.

Back to top

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.

Back to top

Related Topics