SDK credentials for developers

Hello,

we have registered for free plan and trying to use SDK for our app but we do not have ability to generate SDK credentials as described here Skylight Developer Portal because our accounts do not have domain admin privs. This section is not available for us.

I assume that free plan does not allow to use SDK for development, is this correct?

Is there a way to get these credentials for developer domain?

Thank you,
Michael

Hi Michael Welcome to our community!

The Developer Edition does allow you to use the Next-Gen SDK we have available. The authentication is user based, so you would need to use the credentials of one of the two users we provided.

The page you are referencing is for our Legacy product. Have a look in the online documentation https://docs.upskill.io/, especially at the Developer Guides. You will find information on setting up the C# SDK in Part 5 of the Hello World Example.

There is a wealth of information there if you have not had a chance to look already.

Thank you for reaching out! Let us know if there is anything else we can do.

Hi,
thank you for your advices, they wer helpful. We used your examples at developer guide and Hello World.

Now we have encountered with the problem when trying to create session. Our code could not establish connection, execution was stucked at the Connect() method without any information at the log.

We are using Skylight.Sdk 2.0.21. The code example is below.

Could you check what could be a reason? We are working in the domain dev-oganesson52.

private async Task<string> CreateSession(int assignmentID)
        {
            string skyLightDomain = AppSettings.Get<string>("SkyLightDomain");
            string skyLightUserName = AppSettings.Get<string>("SkyLightUserName");
            string skyLightPassword = AppSettings.Get<string>("SkyLightPassword");
            string skyLightApplicationId = AppSettings.Get<string>("SkyLightApplicationId");
            Manager skyManager;

            skyManager = new Manager();
            skyManager.SetCredentials(skyLightUserName, skyLightPassword, skyLightDomain, "https://api.skylight.upskill.io", "ssl://mqtt.skylight.upskill.io");
            skyManager.SetVerbosity(Logger.Verbosity.Verbose);
            await skyManager.Connect();

            var sessionProperties = new Dictionary<string, string>();
            sessionProperties["AssignmentID"] = assignmentID.ToString();
            var session = await skyManager.CreateSession(skyLightApplicationId, "BA"+assignmentID.ToString(), "", sessionProperties);
            return session.SessionId;
        }

Hi Michael! I would recommend trying the following:

  • Try passing in an ISessionEventListener into the Manager constructor; the Hello World example has the main Program class declare ISessionEventListener as an interface, then passes the program itself in as the listener. It’s also possible to create a separate class that uses this interface which then gets passed into the Manager.
  • Try instantiating the Manager in a higher-level function, to ensure that it only gets created once.

Cheers,

~Andrew

Thank you!

We see now that we connected to the server, got tokens, but we have a problem with MQTT connection.

Connecting Mqtt client.
Subscribing to v1/realms/Dev-Oganesson52/users/999b3fce- -579c9f9a16e1/application/#
Subscribing to v1/realms/Dev-Oganesson52/users/999b3fce- -579c9f9a16e1/session/#
Subscribed to topics
Mqtt client disconnected, will reconnect when possible.
Mqtt Connection failed: Connecting with MQTT server failed (BadUserNameOrPassword).

Port 8883 is open. User has Owner role. Should we set additional permission somewhere?

Glad to see it’s progressing forward! For MQTT, try seeing if specifying the domain name (“Dev-Oganesson52”) in all lower case (“dev-oganesson52”); it’s possible that the MQTT broker is case-sensitive.

With that in mind, the root issue seems like it may be something more auth-related, given the error message. I’ll ask our team to reproduce on our side and then post back here.

Cheers,

~Andrew

We were able to reproduce on our side by using an uppercase domain name, which was resolved when we changed the domain name to be fully lower case, so hopefully that should resolve the issue.

Cheers,

~Andrew

It worked! Thank you a lot!

1 Like