Api integration with back-end


We are currently in the phase of integrating the “Amity APIs” into our Back-End system. We have found the API documentation at “Amity API” very useful.

However, we are encountering an issue with the “deviceId” parameter, specifically in endpoints such as “Amity API”.
Could you please advise us on where and how we can access and locate the correct “deviceId” value?


Hello, 'deviceId’ or ‘device token’ used for registering push notifications is a unique identifier assigned by the notification service provider (such as APNs for iOS or FCM for Android) when your app registers for push notifications. Please see the sample code below to obtain the deviceId for iOS:

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
        let tokenParts = deviceToken.map { data in String(format: "%02.2hhx", data) }
        let token = tokenParts.joined()
        print("Device Token: \(token)")
        // Send the token to your server or handle it as necessary
1 Like