This is the API to show an iframe for the Channex mapping screen in your application. The user will be able to create channels and map by themselves.
Generate a One-Time access token
To generate a One-Time access token you should call the next API Method:
1
POST {{server}}/api/v1/auth/one_time_token
Copied!
Please, don’t forget to add your Authorisation header.
You should get the following response:
1
{
"data": {
"token": "94feab9f-60e6-411b-d854-8f12004d8bc8"
},
"meta": {
"message": "You are successfully received one-time token! Use it for exchange to JWT"
}
}
Copied!
At data.token you should receive a One-Time access token to authorise your user in Channex without providing credentials.
After the first usage, token will be removed. The token will live for 15 minutes. Once iframe loaded it will not have an expiry time.
The user will be authenticated under the same user, who requested the Access Token!
Generate the Iframe Code
The next step is to generate the iframe to show to your user
Where {{server}} is the address of the channex server, {{ONE_TIME_ACCESS_TOKEN}} is the token received at the previous step, {{PROPERTY_ID}} is the ID of the Property in Channex which will be associated with the created channels.
Filter available channels
To allow user connect only specific channels, you can pass additional argument channels inside URL: