### GET Request to Validate Token (cURL) Source: https://api3.docs.membes.com/index This cURL command shows how to validate an access token using the Membes API. It requires a token to be passed as a path variable. Successful validation returns user details such as membership status, name, and IDs. ```cURL curl --location -g 'customer-domaintoken/validate/{{tokentovalidate}}' ``` -------------------------------- ### Token Endpoints - Get Access Token Source: https://api3.docs.membes.com/index This endpoint generates a JWT access token. It requires organization ID and secret key, and optionally accepts a payload. A valid token is returned on success, and an empty JSON object on failure. ```APIDOC ## POST /token ### Description This endpoint returns a JWT access token on success. An empty JSON object is returned on failure. ### Method POST ### Endpoint https://ms-auth.membes-ams.com/token ### Parameters #### Request Body - **org_id** (Integer) - Required - Organisation ID - **secret** (String) - Required - Secret key - **payload** (Object) - Optional - Payload for the token ### Request Example ```json { "org_id": 1, "secret": "secret", "payload": { "custom_label": "customvalue", "profile_ID": 1 } } ``` ### Response #### Success Response (200) - **access_token** (String) - Bearer token to be used with all other endpoints ``` -------------------------------- ### POST Request to Get Access Token (cURL) Source: https://api3.docs.membes.com/index This cURL command demonstrates how to request an access token from the Membes API. It includes the organization ID, secret key, and an optional payload. The endpoint is designed to return a JWT access token upon successful authentication. ```cURL curl --location 'https://ms-auth.membes-ams.com/token' \ --data '{ \ "org_id":1, \ "secret":"asdfasdf" \ "payload": {"asd": "ASdf", "profileID": 1} \ }' ``` -------------------------------- ### Token Endpoints - Validate Token Source: https://api3.docs.membes.com/index This endpoint validates a provided JWT access token. It returns membership and profile details if the token is valid. An empty JSON object is returned if the token is invalid. ```APIDOC ## GET /api/v3/token/validate/:token_to_validate ### Description This endpoint returns a JWT access token on success. An empty JSON object is returned on failure. ### Method GET ### Endpoint /api/v3/token/validate/:token_to_validate ### Parameters #### Path Parameters - **token_to_validate** (String) - Required - The token to validate ### Response #### Success Response (200) - **membership_status** (String) - Membership Status - **membership_type** (String) - Membership Type - **surname** (String) - Surname - **first_name** (String) - First Name - **id** (Integer) - ID - **profile_number** (String) - Profile Number - **membership_type_id** (Integer) - Membership Type ID - **membership_status_id** (Integer) - Membership Status ID - **email** (String) - Email ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.