RefreshExternalIdentity
Refreshes the current user's External identity. The token is re-validated by the app's external authentication script (the same one used by AuthenticateExternal), and the call succeeds only if the identity is already attached to the current profile.
If the external authentication script returns an auth payload, it is included in the response as authPayload.
| Service | Operation |
|---|---|
| identity | REFRESH_EXTERNAL_IDENTITY |
Method Parameters
| Parameter | Description |
|---|---|
| externalId | User ID |
| authenticationToken | Password or client side token |
| externalAuthName | The name of the external authentication mechanism (script) to use |
Usage
http://localhost:3000
- C#
- C++
- Obj-C
- Java
- JavaScript
- Dart
- Roblox
- GDScript
- Lua
- Cloud Code
- Raw
// Not available in this client library. To view example, switch to the Cloud Code or Raw tab
// Not available in this client library. To view example, switch to the Cloud Code or Raw tab
// Not available in this client library. To view example, switch to the Cloud Code or Raw tab
// Not available in this client library. To view example, switch to the Cloud Code or Raw tab
// Not available in this client library. To view example, switch to the Cloud Code or Raw tab
// Not available in this client library. To view example, switch to the Cloud Code or Raw tab
-- Not available in this client library. To view example, switch to the Cloud Code or Raw tab
Not available in this client library. To view example, switch to the Cloud Code or Raw tab
-- Not available in this client library. To view example, switch to the Cloud Code or Raw tab
var externalId = "user@example.com";
var authenticationToken = "ghbiuhgvbiuhbiunbuibgin";
var externalAuthName = "MyAuthScript";
var identityProxy = bridge.getIdentityServiceProxy();
var postResult = identityProxy.refreshExternalIdentity(externalId, authenticationToken, externalAuthName);
if (postResult.status == 200) {
// Success!
}
{
"service": "identity",
"operation": "REFRESH_EXTERNAL_IDENTITY",
"data": {
"externalId": "user@example.com",
"authenticationToken": "ghbiuhgvbiuhbiunbuibgin",
"externalAuthName": "MyAuthScript"
}
}
JSON Response
{
"data": {
"externalId": "user@example.com",
"authenticationType": "External",
"externalAuthName": "MyAuthScript"
},
"status": 200
}
Common Error Code
Status Codes
| Code | Name | Description |
|---|---|---|
| 40307 | TOKEN_DOES_NOT_MATCH_USER | The external authentication script rejected the token. |
| 40206 | MISSING_IDENTITY_ERROR | The current profile does not have this External identity attached. |