我们正在使用PHP通过Workplace Account Management API创建和更新Workplace帐户。
创建和更新帐户工作正常,但我们有一个新要求,我们希望通过API自动将用户设置为受邀,主要是因为我们可以从API获取claimLink并将其发送到我们自己的自定义电子邮件中给用户。
我在这里关注详细信息(请参阅“未邀请邀请更新帐户”): https://developers.facebook.com/docs/workplace/account-management/api
我发送的PUT请求似乎成功(没有错误),但它没有将邀请标志从false更改为true,因为文档概述了。
请求正文:
... (Object) stdClass
schemas (Array, 3 elements)
0 (String, 25 characters ) urn:scim:schemas:core:1.0
1 (String, 41 characters ) urn:scim:schemas:extension:enterprise:1.0
2 (String, 60 characters ) urn:scim:schemas:extension:facebook:accountstat...
urn:scim:schemas:extension:facebook:accountstatusdetails:1.0
userName (String, 13 characters ) <my email address>
name (Array, 3 elements)
formatted (String, 7 characters ) AC Test
familyName (String, 4 characters ) Test
givenName (String, 2 characters ) AC
title (String, 5 characters ) Owner
active (Boolean) TRUE
emails (Array, 1 element)
0 (Array, 1 element)
value (String, 13 characters ) <my email address>
urn:scim:schemas:extension:enterprise:1.0 (Array, 2 elements)
department (String, 3 characters ) ,
manager (Object) stdClass
managerId (String, 15 characters ) <a workplace id>
addresses (Array, 1 element)
0 (Array, 8 elements)
type (String, 4 characters ) work
formatted (String, 4 characters ) TEST
streetAddress (String, 0 characters )
locality (String, 0 characters )
region (String, 0 characters )
postalCode (String, 0 characters )
country (String, 2 characters ) US
primary (Boolean) TRUE
urn:scim:schemas:extension:facebook:accountstatusdetails:1.0 (Array, 2 elements)
invited (Boolean) TRUE
inviteDate (Integer) 0
响应:
... (Object) stdClass
schemas (Array, 5 elements)
0 (String, 25 characters ) urn:scim:schemas:core:1.0
1 (String, 41 characters ) urn:scim:schemas:extension:enterprise:1.0
2 (String, 54 characters ) urn:scim:schemas:extension:facebook:starttermda...
urn:scim:schemas:extension:facebook:starttermdates:1.0
3 (String, 60 characters ) urn:scim:schemas:extension:facebook:accountstat...
urn:scim:schemas:extension:facebook:accountstatusdetails:1.0
4 (String, 51 characters ) urn:scim:schemas:extension:facebook:auth_method...
urn:scim:schemas:extension:facebook:auth_method:1.0
id (Float) <my workplace id>
userName (String, 13 characters ) <my email address>
name (Object) stdClass
formatted (String, 7 characters ) AC Test
familyName (String, 4 characters ) Test
givenName (String, 2 characters ) AC
title (String, 5 characters ) Owner
active (Boolean) TRUE
emails (Array, 1 element)
0 (Object) stdClass
primary (Boolean) FALSE
value (String, 13 characters ) <my email address>
addresses (Array, 1 element)
0 (Object) stdClass
type (String, 4 characters ) work
formatted (String, 4 characters ) TEST
country (String, 2 characters ) US
primary (Boolean) TRUE
urn:scim:schemas:extension:enterprise:1.0 (Object) stdClass
department (String, 3 characters ) ,
manager (Object) stdClass
managerId (Float) <workplace id>
urn:scim:schemas:extension:facebook:starttermdates:1.0 (Object) stdClass
startDate (Integer) 0
termDate (Integer) 0
urn:scim:schemas:extension:facebook:accountstatusdetails:1.0 (Object) stdClass
claimed (Boolean) FALSE
invited (Boolean) FALSE
inviteDate (Integer) 0
我不确定我的请求是否有问题,或者是否存在干扰PUT API请求的Workplace Configuration?
任何帮助将不胜感激。提前谢谢!
答案 0 :(得分:0)
虽然文档概述了通过PUT请求将邀请标志更改为true的方法,但我们能够与Workplace开发人员确认情况并非如此。
要解决此问题,我们将Workplace配置更改为自动邀请用户,然后用户自动生成声明链接,该链接可通过API检索。