trying to login to agora rtm but receive the following error: The vendor enabled the dynamic key, but uses the static key - agora.io

Hey guys i'm trying to log into agora rtm using javascript and passed the following params to the login function:
param 1: token = null;
param 2: uid = String(Math.floor(Math.random() * 10000))
passed them to the login function as follows:
await client.login({token, uid});
however recieve the following error messages:
RTM:ERROR Error Code 5 - The vendor enabled the dynamic key, but uses the static key. RTM:ERROR Error Code 5: login failed with args: {"token":null,"uid":"91"}.**
does anyone have a workaround for this? i have set the project as 'testing' in the agora console

The vendor(appId) you are using has token enabled or you can say need a token and appId
for authentication.

Related

IAM role for multi-tenancy (Identity platform)

I am currently working on multi-tenancy using admin auth as per the documentation: https://cloud.google.com/identity-platform/docs/multi-tenancy
I initialized a Tenant Auth with a registered tenantId:
const tenantManager = admin.auth().tenantManager();
const tenantAuth = tenantManager.authForTenant(tenantId);
let tenantData = await tenantManger.getTenant(tenantId)
When I perform any operations using this tenantAuth or get the tenant data, I get the following error
An internal error has occurred. Raw server response: "{"error":{"code":403,"message":"The caller does not have permission","status":"PERMISSION_DENIED"}}"
I can understand it is an IAM role required for the service account key I used for initializing the admin SDK. Can anyone tell what's the valid role to be added?

React Native SDK returns error code 17 while ceating a channel but node library works fine

On trying to create a channel using the react Native SDK, I get the following error
Error: StreamChat error code 17: GetOrCreateChannel failed with error: "User '12345' with roles ['user', 'channel_member'] from teams ['red', '7fdfce50-asdd-ddsaa-976a', '02asdadsa-8ddsadad-adadasdad-7-ca3'] cannot access resource in scope 'messaging' because requested resource does not belong to any team"
But when I try to create a channel using the node library, it works perfectly fine.. any ideas why this is happening?
That error in our case was caused by multitenancy, which may or may not be your issue. The code below works if you're running an app with multitenancy:
const channel = client.channel("messaging", `someuniquestring`, {
team: "Team Name",
members: [memberId1, memberId2],
});
await channel.watch();

Agora.io security token generated invalid (Golang)

Having problem getting security token generated from my server to work properly. I modified the basicLive.js of the demo in AgoraWebSDK-NG to work with my server. I'm using the Golang api provided by Agora to generate the token. Some information:
AppID: ---
App Certificate: ---
channel name: liveshow10
uid: 51495 (I assume Agora does not care about this as long as it is uint32)
token expiration seconds: 3600
generated token: 006cb08a5a2ddc049f79f29d9b52e5909b0IABKKxbI64sFWnkyEICQrL+0DeTsrN9ckKMkDj/oir36aV+tq536WyGcIgCHHmUFHNv6XgQAAQCsl/leAgCsl/leAwCsl/leBACsl/le
But I'm getting bunch of error in the console. I think it boils down to an authorization error the token generated somehow is invalid. Below is the browser console and thanks for any help:
For anyone following along, the issue was related to UID. In the above code the token is generate specifically for UID 51495 but in the Agora Demo, the JoinChannel method passes null as the UID value which tells the SDK to generate its own UID for that user.
When attempting to join a channel with a different UID than the one used to generate the token, you will receive an error.
If you want to generate a token that can be used by any user, you need to set the UID to 0 in the token generation, and then you can use any UID join the channel with this token.
Update: The UID 0 detail can be found in the Token Server API reference within the UID parameter description docs.agora.io/en/video/token_server#api-reference

call to magento soap api expires immediately

I'm trying to do a call to the magento api to get the details of a specific customer. When I do this call I always get the following error:
PHP Fatal error: Uncaught SoapFault exception: [5] Session expired. Try to relogin. in /var/www/magento-client/magento-customer.php:12
Stack trace:
/var/www/magento-client/magento-customer.php(12): SoapClient->__call('call', Array)
/var/www/magento-client/magento-customer.php(12): SoapClient->call('a1a6863c7dadd95...', 'customer.info', 3)
{main}
thrown in /var/www/magento-client/magento-customer.php on line 12
I have a valid api user in the backend, the api session timeout in the backend is set to 9999999999999, and I've even tried to override the isSessionExpired function in the magento core code, but nothing works.
The code is as follows:
$url = 'http://magentourl/api/soap/?wsdl';
$apiUser = "user";
$apiPass = "password";
$proxy = new SoapClient($url);
$sessionId = $proxy->login($apiUser, $apiPass);
// Get new customer info
var_dump($sessionId);
var_dump($proxy->call($sessionId, 'customer.info', 3));
die();
Does anyone have any ideas what the problem could be?
This occurs if you send headers with the request, check if headers are sent.
maybe you should try to truncate the api_session table in the mysql database

Twitterizer 2; Argument null exception

I 'm a newbie to twitter api/twitterizer. I get the following exception for the code shown below. The error occurs when i request access token. Any suggestion on how to fix this??
I downloaded the latest dll(2.3.1) from the twitterizer website.
{"Value cannot be null. Parameter name: String"}
Dim OAuthTokens As New OAuthTokens
Dim accessToken As New Twitterizer.OAuthTokenResponse
accessToken = OAuthUtility.GetAccessToken(ConsumerKey, ConsumerSecretkey, "oauth_token", "oauth_verifier")
thanks
As I said on the forums, the oauth_token and oauth_verifier are given to you in previous steps of the authorization process. Calling the GetAccessToken method is the last step in the process.
Here's an over-simplification of the steps:
1. Get a request token
2. Send/Redirect the user to the authorization/authentication url
3. (The user logs in, grants you access, and Twitter directs them back to your application)
4. Exchange the request token for an access token