New API Authentication Method for My2N Integrations

PAPI Auth v.2

I am getting 404 or 500 when initializing the login flow
Please ensure that you are using the correct endpoints; Auth v.2 login phase uses a different domain and that you are using the proper curl:
I am getting 404 when submitting the login flow

The flow_id parameter in the submit request does not exist.

 

I am getting 410 when submitting the login flow

The flow_id has expired; ensure you use the exact flow_id returned from the previous step when submitting the login flow.

I am getting 400 when submitting the login flow
Always check the returned message in the JSON body for more information. There could be multiple reasons, such as:
  • The provided credentials (username or password) are invalid.
  • There is already an active session for this user.
  • The flow_id parameter is missing or malformed.
I am getting 401 even with a valid token
If you receive a 401 Unauthorized response, verify the following:
  • The user account used for authentication does not have MFA enabled. If MFA is active, disable it or use a different account for API integration.
  • The token is correctly included in the Authorization header using the format: Authorization: Bearer <session_token>
  • You are not including an outdated x-api-key header in your request.
I am getting 409 during authentication
If you encounter a 409 Conflict error when attempting the old authentication process (Auth v.1), it means that your account has already been migrated. The Auth v.1 method is deprecated; you must use Auth v.2 from now on. See more info in our documentation.
Auth v.1:
Auth v.2:
Can I activate MFA on the migrated account used for API?
No, these credentials are intended for machine-to-machine (M2M) communication and therefore must not have Multi-Factor Authentication (MFA) enabled.
 
If your company admin account requires MFA for security reasons, please create a separate account without MFA dedicated to API communication.
How can I ensure there will be no downtime during the migration?

The Auth v.1 endpoint returns 409 Conflict if the provided user has already been migrated and requires Auth v.2. Clients could implement an automatic upgrade mechanism to switch to Auth v.2 and retry the request upon receiving this status code.

How can I see if my account is already migrated?

Login to my2n.com and go to your profile. If you see the option to activate Multi-Factor Authentication (MFA), your account has been migrated and you must use Auth v.2 to use the Partner API.

 

Esta página foi útil?