kojan abzah
02/15/2026, 1:29 PMkojan abzah
02/15/2026, 1:31 PMtoken, err := p.descopeClient.Management.OutboundApplication().FetchUserToken(ctx, &descope.FetchOutboundAppUserTokenRequest{
AppID: "gmail",
UserID: "U2eHGgjJVx9mArVfcsRBykF8OJoN",
})
vs
v1/mgmt/outbound/app/user/token/latest
{
"appId": "gmail",
"userId": "U2eHGgjJVx9mArVfcsRBykF8OJoN"
}Meir Wahnon
02/15/2026, 1:41 PMBhagwanta Yeole
02/15/2026, 2:07 PMkojan abzah
02/15/2026, 2:08 PMTal Aharoni
02/15/2026, 2:13 PM.../latest while in the SDK you don't.
The difference is that you need to provide the exact scopes of the token you are willing to fetch while when using the latest you are asking for the latest token without specifying the scopes.
Currently the latest API is not supported in the GO sdk but we can add it if required.kojan abzah
02/15/2026, 2:21 PMtoken, err := p.descopeClient.Management.OutboundApplication().FetchUserToken(ctx, &descope.FetchOutboundAppUserTokenRequest{
AppID: "gmail",
UserID: userID,
Scopes: []string{
"<https://www.googleapis.com/auth/gmail.readonly>",
"<https://www.googleapis.com/auth/gmail.send>",
"<https://www.googleapis.com/auth/gmail.labels>",
"<https://www.googleapis.com/auth/gmail.compose>",
},
})kojan abzah
02/15/2026, 2:21 PMTal Aharoni
02/15/2026, 2:29 PMU2eHGgjJVx9mArVfcsRBykF8OJoN - there is no token with those scope for this user...kojan abzah
02/15/2026, 2:34 PMTal Aharoni
02/16/2026, 6:16 AMkojan abzah
02/16/2026, 7:33 AMkojan abzah
02/16/2026, 7:33 AMkojan abzah
02/16/2026, 7:35 AMTal Aharoni
02/16/2026, 8:49 AMlastest .
To make sure, you are requesting we the exact scopes via the sdk and still not getting the token?
Can you do the request (with the needed space in that case) and share with me the exact time? i'll take a lookkojan abzah
02/16/2026, 9:41 AMkojan abzah
02/16/2026, 2:03 PMTal Aharoni
02/16/2026, 4:22 PMlatest option.
Regarding that extra space, the scopes be received from several places:
1. the outbound app default scopes
2. the connect action in the flow (if using flows)
3. parameter on the connect request (if using API/SDK)
Probably in one of them the space exist.kojan abzah
02/17/2026, 4:19 AM