그래프 API 버전

Business User

In Graph API v9.0, access to this endpoint was restricted. In Graph API v10.0, access has been restored to all apps, but apps can now only target businesses (or child businesses of those businesses) that have claimed them.

읽기

Represents a business user.

Graph API Explorer
GET /v19.0/{business-user-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{business-user-id}',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{business-user-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{business-user-id}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{business-user-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
그래프 API를 사용하는 방법을 알아보려면 그래프 API 사용 가이드를 읽어보세요.

매개변수

이 엔드포인트는 매개변수가 없습니다.

필드

필드설명
id
numeric string

The business user's ID.

business

Business user is associated with this business.

email
string

User's email as provided in Business Manager.

finance_permission
string

Financial permission role of the user in Business Manager, such as EDITOR, ANALYST, and so on.

first_name
string

User's first name as provided in Business Manager.

ip_permission
string

This user's ads right permission role in Business Manager, such as Reviewer and so on.

last_name
string

User's last name as provided in Business Manager.

name
string

Name of user as provided in Business Manager.

pending_email
string

Email for the business user that is still pending verification.

role
string

Role of the user in Business Manager, such as Admin, Employee, and so on.

title
string

The title of the user in this business.

two_fac_status
string

Two-factor authentication status of the business-scoped user.

에지

Edge설명
Edge<BusinessAssetGroup>

Business asset groups that are assign to this business scoped user

Edge<Page>

Pages that are assigned to this business scoped user

Edge<ProductCatalog>

Product catalogs that are assigned to this business scoped user

오류 코드

오류설명
100Invalid parameter
104Incorrect signature
190Invalid OAuth 2.0 Access Token

만들기

다음 경로에서 business_users 에지에 POST 요청을 만들 수 있습니다:
이 에지에 게시할 때 a BusinessUser이(가) 생성됩니다.

매개변수

매개변수설명
email
string

Email of user to be added to this business.

필수
role
enum {FINANCE_EDITOR, FINANCE_ANALYST, ADS_RIGHTS_REVIEWER, ADMIN, EMPLOYEE, DEVELOPER, PARTNER_CENTER_ADMIN, PARTNER_CENTER_ANALYST, PARTNER_CENTER_OPERATIONS, PARTNER_CENTER_MARKETING, PARTNER_CENTER_EDUCATION, MANAGE, DEFAULT, FINANCE_EDIT, FINANCE_VIEW}

Role of user to add to this business.

반환 유형

이 엔드포인트는 기록 후 읽기를 지원하며 반환 유형에서 id로 표시되는 노드를 읽습니다.
Struct {
id: numeric string,
}

오류 코드

오류설명
100Invalid parameter
457The session has an invalid origin
613Calls to this api have exceeded the rate limit.
415Two factor authentication required. User have to enter a code from SMS or TOTP code generator to pass 2fac. This could happen when accessing a 2fac-protected asset like a page that is owned by a 2fac-protected business manager.
190Invalid OAuth 2.0 Access Token
368The action attempted has been deemed abusive or is otherwise disallowed
200Permissions error

업데이트 중

/{business_user_id}에 POST 요청을 하여 a BusinessUser을(를) 업데이트할 수 있습니다.

매개변수

매개변수설명
email
string

The email of the user at this business.

first_name
string

First name for this business user.

last_name
string

Last name for this business user.

role
enum {FINANCE_EDITOR, FINANCE_ANALYST, ADS_RIGHTS_REVIEWER, ADMIN, EMPLOYEE, DEVELOPER, PARTNER_CENTER_ADMIN, PARTNER_CENTER_ANALYST, PARTNER_CENTER_OPERATIONS, PARTNER_CENTER_MARKETING, PARTNER_CENTER_EDUCATION, MANAGE, DEFAULT, FINANCE_EDIT, FINANCE_VIEW}

The role of the user at this business, such as ADMIN and so on.

skip_verification_email
boolean

Whether to skip sending the verification email. The business persona email still requires verification - but just won't receive an email.

반환 유형

이 엔드포인트는 기록 후 읽기 기능을 지원하며 회원님이 게시한 노드를 읽습니다.
Struct {
success: bool,
}

오류 코드

오류설명
100Invalid parameter
415Two factor authentication required. User have to enter a code from SMS or TOTP code generator to pass 2fac. This could happen when accessing a 2fac-protected asset like a page that is owned by a 2fac-protected business manager.
3914It looks like you're trying to remove the last admin from this Business Manager. At least one admin is required in Business Manager.

삭제 중

/{business_user_id}에 DELETE 요청을 만들어 a BusinessUser을(를) 삭제할 수 있습니다.

매개변수

이 엔드포인트는 매개변수가 없습니다.

반환 유형

Struct {
success: bool,
}

오류 코드

오류설명
3914It looks like you're trying to remove the last admin from this Business Manager. At least one admin is required in Business Manager.
368The action attempted has been deemed abusive or is otherwise disallowed
200Permissions error
100Invalid parameter
2635You are calling a deprecated version of the Ads API. Please update to the latest version.