You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Overview


This User Creation API is called with a payload (transmitted data) of the user information from the a third party provider's contact screen. The web application will run validations and create the user after the validations are passed. An option in the payload is to specify whether a welcome email is to be sent to the user.


This is the primary data sent:

  • First Name
  • Surname
  • Email Address
  • Customer Code
  • Account Administrator (for notification of newly-created user)

If the user already exists, you will be alerted with a message. 


This guide covers what you have to do in the process to set up the User Creation API. To create code to retrieve the authorisation token and code to the API call endpoint, you will need the following: 

  • The ClientID and ClientSecret (will be provided to you)
  • The Token api endpoint: /api/token
  • The api endpoint: /api/user 


Prerequisites

  1. URL (will be provided to you)
  2. Username
  3. Password 
  4. Sample Setup Request file (see example at the end of this page)
  5. API testing app / browser add-on: 


Step-by-step guide

1. Get Authorisation Token 

Before any API call is made, an authorisation token must be created.


1. Open Postman.

2. Set the request type to 'POST'. 


3. Enter the URL in the Access Token URL field. 


4. Add the client ID and Client Secret provided to you.

6. Click Get New Access Token to get the token. 

The 'Authorization' uses the above auth value to generate the token:

7. The response is an object with two fields:

  • Token Type: this is the authorisation type that is needed for the api calls (should be 'bearer' usually)
  • Access Token: this is the actual token

Make the API call

The Token Type and Access  Token are needed to make the API call. The API endpoint requires use of the token type and token in the authorisation header.

The API request returns the headers and payload in JSON.


NOTE - The response object should contain a response that allows you to see whether the call succeeded and whatever response information the call will return. All responses should contain "Success" and may contain "Message" (it should have the field but might have no content depending on the service). All other fields on the response object are endpoint specific.






  • No labels