API - Integration - SDK related questions and answers

Created by Daniil Stasiuk, Modified on Fri, 27 May, 2022 at 1:03 PM by Daniil Stasiuk

API integration SDK related questions

Customer questions and answers: 


Now we are starting the process of integrating the SDK/API into our apps, could you please confirm our understanding of the flow and clarify the several questions we have at the bottom?

[All calls made by the mobile app]
--------------------------------------------------------------
STEP 1
clay.init(apiKey: api_key, installationUID: installation_uid, delegate: self)
which will generate a public key and store it in the SDK.
--------------------------------------------------------------
STEP 2
clay.getPublicKey()
which returns the SDK's stored public key.
--------------------------------------------------------------
STEP 3
POST /v1.1/me/devices
{
public_key: public key,
device_name: "Bryan's iPhone 7",
device_uid: "2552"
}
which will return a certificate and device_id.
store the device_id locally for future use.
-------------------------------------------------------------
STEP 4
GET /v1.1/me/devices/{device_id}/mkey
which will return the mobile key.
store the mobile_key locally for future use.
--------------------------------------------------------------
STEP 5
clay.openDoor(mobileKey: mobile_key)
which will return some data to relevant delegate/callbacks.
--------------------------------------------------------------
Questions:

1. [Step 1] Where can I get the api_key?


Answer: 


Note : (Internal note) 


Depends on the instance ( test, production, accept, dev) we can send them the public key from the documentation available from the dropbox link:


Mobile key flow.pdf

2. [Step 1] Is installation_uid up to us to decide? any suggestions?


Answer: 


It is up to the integrating partner to choose this

3. [Step 3] Is this correct type of data for device_name and device_uid? any suggestions?

Answer: 

Again, up to them, we advise something unique as a name


4. [Step 3] Do I need to do anything with the certificate?


Answer: 


No, usually they do not need the certificate, maybe they can just save the endpoints.


5. [Step 4] Is this the correct endpoint? There is inconsistency between swagger documentation and developer documentation.


Answer: 

We advise them to use the swagger documentation as it is up to date
-----------------------------------------------------------------------------------------------------------
A few more SDK related questions:

For Android


* We need to know which versions of ClaySDK and JustinMobileSDK are compatible with each other.


Answer:


For android they can find the justinmobile and Gradle dependencies which they will need. The files are available in the dropbox link.




NOTE: ONLY NDA signed partners would have access to the link

 
For iOS


* The documentation describes: "Locate the ClaySDK.framework. Drag ClaySDK.framework into your project", but we don't have access to any ClaySDK. Just as on Android it is downloaded as a dependency, on iOS it seems like we have to have access to SDK and copy it. Can you send it?or can you allow me access to it?
Answer:

Answer: 


They should be able to download clay SDK from available in the dropbox link.


NOTE: ONLY NDA signed partners would have access to the link

If you have signed NDA, but missing the dropbox link to access the file, please reach out to KS connect partnership manager.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article