Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
slack ruby客户端:设置了用户配置文件的用户无效_Ruby_Slack Api - Fatal编程技术网

slack ruby客户端:设置了用户配置文件的用户无效

slack ruby客户端:设置了用户配置文件的用户无效,ruby,slack-api,Ruby,Slack Api,我使用users\u profile\u set方法获得了Slack::Web::Api::Error:invalid\u user。我有2个用户,我的find_user方法(返回带有用户信息的响应)对他们很有效。但是,如果我想更改状态(在这种情况下也是如此)——对于一个用户,一切都是正确的,对于第二个用户——我有这个错误 呼叫用户配置文件设置方法示例: client.users_profile_set(user: find_user.id, profile: status.to_json)

我使用users\u profile\u set方法获得了Slack::Web::Api::Error:invalid\u user。我有2个用户,我的find_user方法(返回带有用户信息的响应)对他们很有效。但是,如果我想更改状态(在这种情况下也是如此)——对于一个用户,一切都是正确的,对于第二个用户——我有这个错误

呼叫用户配置文件设置方法示例:

client.users_profile_set(user: find_user.id, profile: status.to_json)
我的示例状态哈希:

{:status_text=>"Remote - Today", :status_emoji=>":house_with_garden:"}
查找用户:

client.users_list.members.find { |member| member.profile.email == user.email }

我做错了什么?

更改用户配置文件的选项仅在Slack的付费计划上有

如果您使用的是用户创建的API令牌(现在称为“传统API令牌”),则可以更改您自己的配置文件。只是不是别人的。