0

我们正在使用 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 请求的工作场所配置?

任何帮助,将不胜感激。提前致谢!

4

1 回答 1

0

尽管文档概述了通过 PUT 请求将受邀标志更改为 true 的方法,但我们能够与 Workplace 开发人员确认情况并非如此。

为了解决这个问题,我们将 Workplace 配置更改为自动邀请用户,这反过来会自动生成一个声明链接,可以通过 API 检索该链接。

于 2018-02-13T19:11:04.863 回答