This method is used to authenticate with your application, unless your application has an AuthProcess specified. It is responsible for verifying the supplied user credentials and establishing or renewing a connection. The authentication information will be stored in the metadata object and will be included in all request bodies. All applications must implement the Register method.

If your application has an AuthProcess specified then the Register method will still be called when a user creates a connection, however the connection will have already been authenticated via the configured type - OAuth2, etc... - and the resulting access token will be available in the authorization property of the request. Any additional steps required for connecting a user can occur at this point, such as validating that they have access to specific services and so on. You are not responsible for storing primary authorization information (access tokens, etc...) in the metadata as that has been delegated to the configured auth process in this scenario, but you are free to include any additional information that should be included in future requests relating to the connection.


module.exports = async function Register(request) {
// Your code here
import { RegisterRequest, RegisterResponse } from "@shipengine/connect-carrier-api";
export const Register = async (request: RegisterRequest): Promise<RegisterResponse> => {
// Your code here



An object containing the authentication information gathered using the connection form you created for your application. It will contain whatever fields you defined in this form. Your method must then use this data to perform authentication with your backend service.


An object containing the fields defined in your connecion form.


The transaction ID uniquely represents this request. If the request is retried then this transaction ID will be the same. You should only perform the requested action once per given transaction ID.


authorization object

The authorization information necessary to fulfill this request.


Custom data about this request.

Return Value


The Register method returns the result of the carrier's authentication process. This information will be included in the metadata of every subsequent request to your application.


An object containing basic authentication information for the integration.


The username used to authenticate with the carrier's API, or another identifier for the account with the carrier such as account id. This field is used to differentiate between multiple accounts with the same carrier, and if the register function returns the same username for multiple accounts, then the API will only allow one of the accounts to be connected.


The user's password


metadata object

This object should contain all of the necessary properties needed to make authenticated requests with the carrier. Every property included here will be persisted by ShipEngine Connect and included on each subsequent request from this user.