question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to get the userID required for assistant push notification?

See original GitHub issue

Recording to this manual, you have to use conv.arguments.get(‘UPDATES_USER_ID’) to get the userID in “finalize subscription” - Intent. But I am only able to get undefined. After looking at the conv, you can see there in no ID in the whole json:

{  
    "parsed":{  
        "input":{  
            "PERMISSION":true
        },
        "list":[  
            true,
            null
        ]
    },
    "status":{  
        "input":{  

        },
        "list":[  
            null,
            null
        ]
    },
    "raw":{  
        "list":[  
            {  
                "textValue":"true",
                "name":"PERMISSION",
                "boolValue":true
            },
            {  
                "name":"text"
            }
        ],
        "input":{  
            "PERMISSION":{  
                "textValue":"true",
                "name":"PERMISSION",
                "boolValue":true
            },
            "text":{  
                "name":"text"
            }
        }
    }
}

So how do I get the actual userID. I also would be pleased if there is the possibity of a broadcast. Do you know a solutions?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
JohannesMaiercommented, Dec 11, 2018

Ok, I found the solution. If conv.arguments.get(‘UPDATES_USER_ID’) returns undefined, use conv.user.id (its deprecated but ok). And then the push notification is only on this device enabled from which the conv.arguments.get(‘PERMISSION’) Intent has been called (eg smartphone, tablet, etc.)

0reactions
santhosh-kteccommented, Jun 17, 2019

Its receiving for first time but not on consequent calls to get permissions for same intent

Read more comments on GitHub >

github_iconTop Results From Across the Web

User-Id for Push-Notification on Actions for Google
I am coding Java. Everything is working, expect getting the correct user id. When I hardcode my user it works, but how do...
Read more >
Push by User ID - Pushwoosh
Push by User ID · This method allows you to send targeted push notifications to your users across their multiple devices. · Call...
Read more >
Push notifications (Dialogflow) | User engagement
Go to the Actions console and navigate to Build > Actions. · Click the Action that matches the additional triggering intent you want...
Read more >
Registering Your App with APNs - Apple Developer
In your developer account, enable the push notification service for the App ID assigned to your project. For more information about configuring your...
Read more >
External User Ids - OneSignal Documentation
You can send OneSignal your unique User Id called the external_user_id to associate multiple player_id records. Linking an External User Id to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found