quickblox / documentation Goto Github PK
View Code? Open in Web Editor NEWThe markdown sources of QuickBlox documentation
The markdown sources of QuickBlox documentation
Hi,
I am trying to do a functionality in which I would be getting updated when any user logsin to chat or logsout of chat. As per the documentation ( in https://quickblox.com/developers/Android_XMPP_Chat_Sample), I have implemented groupChatDialog.addParticipantListener(participantListener) for getting update if any user sends the subscription request through "chatRoster.subscribe(userID)" is done by any other user and in callback function it accepts the subscription through confirmSubscription function.
But what would happen when the user to which we have sent subscription request is offline is not clear.
I debugged and saw that the collection which we get through chatRoster.getEntries() gives us the list of all users which have requested as well as which have confirmed our subscription but I am not getting any updates for presence of the users which have pending confirmation. Further I searched for any documentation regarding this but I haven't found anything. How to handle this situation?
Hi, we use quickblox in our application. Some functions require store user info in our databases. We want to use method reset pasword through our servers, but as wrote in your rest api, it possible if user remember his old password or he can make it through email. But we doesn't use email in user model.
Is it possible to change user password without remember old password or using email? As it work in QB web admin panel.
Hi,
We have been following quickBlox documents for creating signature to be used for Rest API "https://api.quickblox.com/session.json" with body as
" {"application_id":"62009", "auth_key":"5aEUnVvFRSEfDeb", "timestamp": "1505802326", "nonce": "33533", "signature":"afb700e027914f6877809c6c3d46a5f7416a7077"}"
and response is
{
"errors": {
"base": [
"Unexpected signature"
]
}
}
The code for generating the signature is as follow in java
public class HmacSha1Signature {
public static void main(String[] args) throws Exception {
String signature_string ="application_id=62009&auth_key=5aEUnVvFRSEfDeb&nonce=33532×tamp=1505802326&user[login]=9891518265&user[password]=123";
System.out.println(hmacDigest(signature_string, "6EESPASrHQ9VnCp", "HmacSHA1"));
}
public static String hmacDigest(String msg, String keyString, String algo) {
String digest = null;
try {
SecretKeySpec key = new SecretKeySpec((keyString).getBytes(), algo);
Mac mac = Mac.getInstance(algo);
mac.init(key);
byte[] bytes = mac.doFinal(msg.getBytes("ASCII"));
StringBuffer hash = new StringBuffer();
for (int i = 0; i < bytes.length; i++) {
String hex = Integer.toHexString(0xFF & bytes[i]);
if (hex.length() == 1) {
hash.append('0');
}
hash.append(hex);
}
digest = hash.toString();
} catch (UnsupportedEncodingException e) {
} catch (InvalidKeyException e) {
} catch (NoSuchAlgorithmException e) {
}
return digest;
}
}
Further I am attaching the screen shot of postman response. Could you please tell us what we are doing wrong to create signature?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.