A User key identifies a Wuf receiver account, and it is shared across different devices if the user logs in with the same account.
You and the users can get the User Key by installing the mobile app for iOS or Android.
The User Key will appear just after the Sign-in page on the first installation.
After that, the User Key will be accessible from the settings page, by clicking on the three dots icon.
Make your first request
To make your first request, send an authenticated request to the push endpoint.
Send push notification
POSThttps://api.usewuf.com/v1/push
Request Body
{"id":"cllld08g00001ky08yqf5qdozson"}
Take a look at how you might call this method using different languages, or via curl:
curlhttps://api.usewuf.com/v1/push-dapiKey='aeZVV0aaUA8y0Dqij_ptna'-duserKey='uswXhaoDan2maAerZK9HZV'-dtitle='New message received'-ddescription='Hey, how are you doing?'-demoji='💬'-durl='https://mychat.app/user/john'
import http.clientimport json# Setup connectionconn = http.client.HTTPSConnection("api.usewuf.com")# Define the endpointendpoint ="/v1/push"# Create payloadpayload ={"apiKey":"aeZVV0aaUA8y0Dqij_ptna","userKey":"uswXhaoDan2maAerZK9HZV","title":"New report","body":"Read the latest news","emoji":"📈","url":"https://mysite.com/report-2023",}# Convert the payload to a JSON stringheaders ={'Content-Type':'application/json'}# Send the POST requestconn.request("POST", endpoint, body=json.dumps(payload), headers=headers)# Get the responseresponse = conn.getresponse()data = response.read()print(data.decode("utf-8"))# Close the connectionconn.close()
require'net/http'require'uri'require'json'# Setup URI and HTTPuri =URI.parse("https://api.usewuf.com/v1/push")http =Net::HTTP.new(uri.host, uri.port)http.use_ssl =true# Create payloadpayload = {"apiKey"=>"aeZVV0aaUA8y0Dqij_ptna","userKey"=>"uswXhaoDan2maAerZK9HZV","title"=>"New report","body"=>"Read the latest news","emoji"=>"📈","url"=>"https://mysite.com/report-2023"}# Setup requestrequest =Net::HTTP::Post.new(uri.request_uri, {'Content-Type'=>'application/json'})request.body = payload.to_json# Make the requestresponse = http.request(request)puts response.body