I am getting a 401 unauthorized when testing the Get Token API. What is the dev CloudLink portal URL so I can confirm/reset my credentials for the Dev account 327410625? Thanks
Hi Josh! You shouldnât need to touch the credentials, I think your issue is likely the endpoint that youâre hitting. The documentation right now directs you to the Production endpoints, youâll want the Sandbox endpoints which are:
{service}.dev.api.mitel.io
In the case of the Get Token, youâll want to use https://authentication.dev.api.mitel.io/2017-09-01/token
Let me know if that fixes your issue. Thanks for pointing this out, weâll see about getting the documentation updated to reflect the different environments.
Thanks. Iâm still having an issue. I am using the post command and variables in the body that were provided via the screen shot on our call yesterday.
POST: https://authentication.dev.api.mitel.io/2017-09-01/token
Body
grant_type
username
password
account_id
Leaving blank give me the same 401 unauthorized error.
Thanks
Are you saying that youâre leaving the values in the body blank? If so, you do need to populate it:
grant_type: âPasswordâ
username: {username}
password: {password}
account_id: â327410625â
When you go to refresh the token later, you donât need to supply the username and password again and can instead use the ârefresh_tokenâ provided with the initial token to get an updated set:
grant_type: ârefresh_tokenâ
refresh_token: {refresh_token}
No. I initially used my email address as username and what I thought was my password. Since I received the 401 unauthorized, I kicked off this request to determine what my credentials were or to reset them. Thanks
Hi Josh - Sorry for the confusion here. You can access your account through https://accounts.dev.mitel.io
If your credentials work there, then they should also work for the POST Token API call. If they donât work, then you can reset your password.
All this said, I did make a mistake in my earlier post. The Auth request doesnât use JSON for the content-type, it uses application/x-www-form-urlencodedâŚhowever I suspect you already knew that
For reference, hereâs a screenshot of a call that works for me using my credentials (just in case youâre doing something different):
Thanks. I was able to reset the password and I can get a token now. Appreciate it.
Related question. I received token and tried to use it for subsequent API call (create conversations) by putting token within header but getting unauthorized error. I canât find details on where to place within the request
Nevermind. I got past that part but now I am getting data.originalParticipants(0).type should be equal to one of the allowed values.
What are the allowed values for this parameter?
If you expand the âOriginalParticipantsâ object here, youâll see the allowed values for âtypeâ are âSMSâ, âUserâ or âWorkflowâ. I suspect youâll want âUserâ.
Thanks,
I actually did do that before, but I used âUserâ and got the error message. Did not realize that I had to type âUSERâ in all caps for it to work.
Thatâs a good catch! Weâll make sure to make a note of case sensitivity as we improve the documentation.
Hi,
I am just started learning Mitel API for Application integration and got confused with credentials .so can you please guide me where I can get the username, password and account_id .I already have Mitel credentials but that are not working for me .I am using postman for sending /token request and got invalid credentials response.
Thanks
Hi there XLD, welcome to the community forum!
Do the Mitel credentials that you have work with the CloudLink Accounts Portal (https://accounts.mitel.io)? If you can, then youâll be able to find your accountId easily from there.
If you canât login, then the credentials you have arenât CloudLink credentials. Iâll need to know if youâre a Mitel Authorized Partner (feel free to PM me) and we can go from there.
Thanks for the response budd .
Budd, I am not able to login using my credentialsâ need your guidance for integrating my ERP with Mitel cloudLink platform .right know i have some information that i mention below
1.PDF document named âSystem OAI Toolkit Specifications Manualâ
2.On premises devices setup
3.and the name of the product is Mitel5000.
that info i have can you please guide me further
Thanks
Hi XLD,
Iâm not familiar with the PDF document youâre referring to, but it looks like it might be an OAI integration guide for the MiV5000 which is for directly integrating with that PBX, something quite different from the CloudLink APIs and is currently outside the scope of the Developer Portal and Community Forums.
You will need a few things you typically need to get started, thereâs a good guide here: Getting Started.
That said, your account information implies you may actually be from the ERP vendor? If thatâs the case, you will need to at least be a Mitel Technology Partner in order to obtain a CloudLink account and use the APIs. Typically in your scenario you would use the account information for the Mitel customer that you are creating the integration for.
If Iâm wrong and you are from a Mitel Authorized or Mitel Technology Partner, someone in your organization should have your CloudLink information. You can try logging into https://miaccess.mitel.com/ and see if you have âCloudLink Account Consoleâ in the navigation menu. If you canât login to MiAccess or know who in your organization has the information you need, you will need to reach out to your Mitel Channel (or Technical) Account Manager.
In regards to the integration youâre looking to build with an ERP, Iâm happy to provide some guidance around using the APIs to achieve your goals, I just need some details around what exactly youâre looking to accomplish.
Hi budd,
Thanks for the details
I got some info like
1.They have Linux platform where Mitel system is setup.
2.also got an IP address. a technical person said to me that you can integrate using IP address via TCP IP socket.
3.Mitel authorized partner is Patriot Communications (owner Robert Murray)
can you please help me with above mention info.
My Goal is to make call from my ERP system and download call logs with recording.
Thanks
Hi XLD,
To authenticate youâll need to reach out to Patriot Communications and have them provide you with the relevant CloudLink account and user information. We recommend that initial development be performed in a dedicated sandbox environment.
You will most likely also want to Create a Client with the Admin API, which will in turn be used by your integration to authenticate against the APIs. The client in this case acts like a service account, so you donât need to use a real user account or create a dummy one (use grant_type = client_credentials when requesting the token).
Once youâre able to authenticate, you can use the Call History resource, however thatâs typically used for getting specific call records. Alternatively you can make use of the Notifications API to receive notifications when a call has completed as it contains a fair amount of information about the call. For an integration with an ERP system, when you create the Subscription you will most likely want to set it up to send you notifications via webhooks as opposed to creating a websocket connection (though thatâs possible to do).