Start a conversation

Why do I get an “Unauthorized” 401 error?

The "Unauthorized" error means that you have not created the user for your application in the Dashboard OR your login/email or password are wrong, or if the user exists - the session was created without user credentials.

Or 401 error can occur if the application/user session token has expired and you need to generate a new one.

To access QuickBlox APIs you need to authenticate your application with the QuickBlox server. A token-based authentication should be used to provide secure access to QuickBlox APIs.

The token-based authentication works by ensuring that each request to the server contains a token that is verified by the server for authenticity. When authenticity is verified, the server responds to the request.

There are two types of tokens: application session tokens and user session tokens.

The application session token is limited to read-only permissions preventing changes to application data, while the user session token is not restricted in permissions and allows the user to make edits to application data.

Please make sure that you follow the steps described in our documentation: 

iOS SDK - Authentication | iOS SDK | QuickBlox

Android SDK - Authentication | Android SDK | QuickBlox

JavaScript SDK - Authentication | JavaScript SDK | QuickBlox

React Native SDK - Authentication | React Native SDK | QuickBlox

Flutter SDK - Authentication | Flutter SDK | QuickBlox

Server API - Authentication | Server API | QuickBlox

Also make sure to update user details in the code sample as well as credentials.

More information about API error codes and descriptions can be found here:

Error codes and types

Feel free to check our official documentation for more information that will help you to integrate QuickBlox services into your applications / projects or contact our Support team by submitting a ticket if you have any other questions.

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Maksym Pidhorbunskyi

  2. Posted
  3. Updated

Comments