All URIs are relative to https://cdn.emnify.net
Method | HTTP request | Description |
---|---|---|
userActivationPost | POST /api/v1/user/activation | Activate User |
userActivationResendPost | POST /api/v1/user/activation_resend | Resend User Activation E-mail |
userPasswordPatch | PATCH /api/v1/user/password | Change Password |
userActivationPost($body)
Activate User
This service activates the user account and sets a password. The activation key is sent via email. In this request, the following details should be provided: * activation_token
(String required) - the activation token sent to a user via email * password
(String required) Note: This is a public (unauthenticated) service which ignores auth tokens
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Emnify\EmnifySdk\Api\PasswordManagementAndActivationApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$body = new \Emnify\EmnifySdk\Model\AccountActivationrequest(); // \Emnify\EmnifySdk\Model\AccountActivationrequest |
try {
$apiInstance->userActivationPost($body);
} catch (Exception $e) {
echo 'Exception when calling PasswordManagementAndActivationApi->userActivationPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Emnify\EmnifySdk\Model\AccountActivationrequest |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userActivationResendPost($body)
Resend User Activation E-mail
This service re-sends activation mail to the user. As this endpoint is open to the public (no authentication token necessary), it requires instead the google reCAPTCHA token to ensure that no robot is performing the request. Moreover there is a time limit on how often a given user may be issued with a new Activation Mail. User has to provide: * username
(String required) * g-recaptcha-response
(String required) - auto-generated from a form using Google reCAPTCHA > According to the reCAPTCHA documentation a "Site Key" is necessary. If you want to implement this feature in your client, please contact emnify support to obtain this "Site Key" for your domain.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Emnify\EmnifySdk\Api\PasswordManagementAndActivationApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$body = new \Emnify\EmnifySdk\Model\ResendActivationMailrequest(); // \Emnify\EmnifySdk\Model\ResendActivationMailrequest |
try {
$apiInstance->userActivationResendPost($body);
} catch (Exception $e) {
echo 'Exception when calling PasswordManagementAndActivationApi->userActivationResendPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Emnify\EmnifySdk\Model\ResendActivationMailrequest |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
userPasswordPatch($body)
Change Password
Password change service. Allows to change the password for the currently authenticated user. User has to provide: * old_password
(String required) * new_password
(String required) #### Notes * The client application should invalidate the authentication token.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearerAuth
$config = Emnify\EmnifySdk\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Emnify\EmnifySdk\Api\PasswordManagementAndActivationApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Emnify\EmnifySdk\Model\ChangePasswordrequest(); // \Emnify\EmnifySdk\Model\ChangePasswordrequest |
try {
$apiInstance->userPasswordPatch($body);
} catch (Exception $e) {
echo 'Exception when calling PasswordManagementAndActivationApi->userPasswordPatch: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Emnify\EmnifySdk\Model\ChangePasswordrequest |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]