en:server_docs:corp_sso:sso_init_webapi_access

Switch Enterprise For sWebApi

Overview

  • This API is used to switch the current logged-in enterprise (virtual login) before calling sWebAPI;

Glossary

  • APIs that require switching the current logged-in enterprise (virtual login) through this API before calling are called sWebAPI;
  • Whether it is sWebAPI will be explained in the specific API;

Authorization

Data Dimension Authorization Enterprise-level Authorization This API requires enterprise-level authorization. Both enterprise-level and agent-level authorization accounts can call this API. Please refer to Authorization Methods.
Interface Dimension Authorization Default Authorization This API is granted by default, so you don't need to apply for interface dimension authorization separately for your authorization account. Please refer to Authorization Methods.

Request

Request Entry Point

HTTP URL Path /v1/sso/init_webapi_access
HTTP Method GET
Parameter Type Required Description
Authorization string Yes
  • Access token
  • Format: Bearer access_token
  • Example: Bearer T.WcnhSdYj-kwVBpP27LRQrw.OBt95zE4TH-OPzIX6OkEWPo4rbR6s.ori-67facfd90b2744220a5eae850e51
  • Please refer to: Authentication Methods
Parameter Type Required Description
ov_corpid string Yes The target enterprise ID to switch to (virtual login).
access_scope string No

The scope type of virtual login, which will be given in the sWebAPI-supported scope types in the specific APIs belonging to sWebAPI.

  • corp
    • SWebAPI of enterprise backstage (reception backstage)
  • user
    • SWebAPI of robot WeChat mini-program
# Please replace the entry point with yours according to your region
curl --location 'https://global-openapi.orionstar.com/v1/sso/init_webapi_access?ov_corpid=test_ov_corpid' \
     --header 'Authorization: Bearer YOUR-ACCESS-TOKEN'

Response

Parameter Type Description
code int Error code. 0 means success, non-zero means failure, Please refer to Error Codes.
msg string Error description. When there is a failure, a specific error description will be provided.
req_id string Log tracking ID. When encountering problems that require assistance from OrionStar, please provide this tracking ID value.
data object Business data object, see below for details Response Body Data Object.
Parameter Type Description
access_scope string Same as the access_scope in the request parameters.
ov_corpid string Same as the ov_corpid in the request parameters.
{
    "code": 0,
    "msg": "",
    "data": {
        "access_scope" : "corp",
        "ov_corpid" : "test_ov_corpid"
    }
}
  • Last modified: 2024-04-09 20:54 +0800