My2Cloud publishes an interactive API reference (Swagger UI) where you can browse every endpoint and run it live against your own account. This guide shows how to open it, sign in for a token, and make a call.
Before you start. You need a My2Cloud login with API access. You call the API as yourself, so you only ever see the data your account is permitted to see. Do not share access tokens - anyone holding one can act as you until it expires.
1. Open the Swagger UI
Browse to /swagger on your My2Cloud address:
- Tenant users:
https://<your-company>.my2cloud.net:44301/swagger - Host administrators:
https://my2cloud.net:44301/swagger
The address you use sets which organisation you sign in to, so always use your own company's subdomain. You will see the API title, an Authorize button, and the list of endpoints grouped by area.
2. Get an access token
- Expand
POST /api/TokenAuth/Authenticateand click Try it out. - In the request body, enter your
userNameOrEmailAddressandpassword. - Click Execute.
- In the response, copy the value of
result.accessToken.
result.accessToken.3. Authorize Swagger with your token
- Click the Authorize button (the padlock, top right).
- In the value box, enter
Bearerfollowed by the token you copied, for exampleBearer eyJhbGciOiJ… - Click Authorize, then Close. The padlocks now show as locked/closed, meaning your calls are authenticated.
Bearer <token> into the value box.Tip. Some browsers pre-fill the
Bearer word for you - if so, paste just the token. If a call returns 401 Unauthorized, your token has expired: repeat steps 2 and 3 for a fresh one.4. Call an endpoint
- Expand any endpoint (for example a
GETunder one of the service groups). - Click Try it out, fill in any parameters, and click Execute.
- Read the Server response: the HTTP status, the JSON body, and the exact
curlcommand Swagger used (handy for scripting).
Useful to know
- Raw specification. The machine-readable OpenAPI document is at
/swagger/v1/swagger.json- import it into Postman, Insomnia or a code generator. - Your permissions apply. Endpoints and data are limited to what your account can access; a filtered user only sees their permitted accounts.
- Tokens expire. Re-authenticate when you get a 401. Treat tokens like passwords - never paste them into shared documents or tickets.
- Right address. If endpoints return no data, check you opened Swagger on your own company's subdomain.
Troubleshooting
- 401 Unauthorized - not authorized, or the token expired. Redo steps 2 and 3.
- The Authorize dialog keeps the padlock open - the value must be
Bearer <token>; check for stray spaces or a missing/extraBearer. - The page will not load - confirm the address and port (
:44301) and that you can reach the portal normally. If it persists, raise a ticket with the address you used and a screenshot.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article