Skip to content
This repository was archived by the owner on Jul 3, 2024. It is now read-only.

Latest commit

 

History

History
22 lines (20 loc) · 787 Bytes

File metadata and controls

22 lines (20 loc) · 787 Bytes

get app_access_token

You can get it in two steps.

  1. Initialize SDK configuration.
  2. Use GetAppAccessToken function in SDK/auth/authorization.go to get app_access_token.

Initialize SDK configuration

Please refer to
SDK Init doc
SDK Init code

get app_access_token

You can use GetAppAccessToken function in SDK/auth/authorization.go to get app_access_token easily.
Of course, you should initialize SDK configuration first.

func GetAppAccessToken(ctx context.Context, appID string)(string,error){
   accessToken, err := auth.GetAppAccessToken(ctx, appID)
   if err != nil {
      return "", fmt.Errorf("get AppAccessToken failed[%v]", err)
   }
   return accessToken, nil
}