Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To proceed with this section you need the AWS credentials key pair, which are provided by DataTalks. Also, you need to inform DataTalks that you wish to send test events so we can configure our API. To test the authentication and sending contacts/events you can use Postman/a REST client software such as Postman or Insomnia (Insomnia is used in this example).

For this example we assume very simple customer mappings. For contacts we assume the fields “customeremail” and “customername” exist, these will be mapped to the Salesmanago fields “email” and “name”, respectively. For events we assume the fields “customeremail” and “type” are mapped to “email” and “contactExtEventType”, respectively.

...

  1. Create a new GET-request (left bar in Insomnia).

  2. As the endpoint (top field in Insomnia), enter the endpoint https://htpfdjhk3h.execute-api.eu-west-1.amazonaws.com/Staging.

  3. Under “Auth” Auth(top bar), select “AWS AWS IAM v4”v4. Enter the AWS credentials key pair sent to you and set “Region” to “euRegion” to “eu-west-1”1.

  4. Under “Body” Body(top bar), select “JSON”JSON. This is where the payload is entered.

  5. Enter and send the following test payload:

...

If the authentication is correct you should receive a 404 error like {“message”: “No method found maching matching route / for http method GET.”}. If the authentication fails you should receive an error message like one of the following: {“message“: “The security token included in the request is invalid.”} or {“message”: “The security token included in the request is invalid.”}

...

  1. Create a new POST-request (left bar in Insomnia).

  2. As the endpoint (top field in Insomnia), enter the endpoint https://htpfdjhk3h.execute-api.eu-west-1.amazonaws.com/Production/contacts

  3. Configure “Auth” Authas done when testing the authentication.

  4. Under “Body”Body, select “JSON”JSON. Then enter and send the following test payload.

...

  1. Create a new POST-request (left bar in Insomnia).

  2. As the endpoint (top field in Insomnia), enter the endpoint https://htpfdjhk3h.execute-api.eu-west-1.amazonaws.com/Production/events

  3. Configure “Auth” Authas done when testing the authentication.

  4. Under “Body”Body, select “JSON”JSON. Then enter and send the following test payload.

...