Skip to content

UpdateApiToken#

Postman Apidog

The method is designed to receive a new instance token.

Request#

To send a request to updateApiToken, you have to execute a request at:

GET
{{apiUrl}}/waInstance{{idInstance}}/updateApiToken/{{apiTokenInstance}}

For apiUrl, idInstance and apiTokenInstance request parameters, refer to Before you start section.

Response#

Response parameters#

Parameter Type Description
apiTokenInstance string Instance token

Response body example#

{
    "apiTokenInstance": "d4e4276df8044c259611ee08aefc198482b441126d517a466d"  
}

In case of failure, you get a response with HTTP 200 status, a JSON string with a code and description of the error is returned in the response body:

{
    "code": 401,
    "description": "Unauthorized"
}

UpdateApiToken#

For a list of errors common to all methods, refer to Common errors section

Request examples#

import requests

url = "{{apiUrl}}/waInstance{{idInstance}}/updateApiToken/{{apiTokenInstance}}"

payload={}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
curl --location -g --request GET '{{apiUrl}}/waInstance{{idInstance}}/updateApiToken/{{apiTokenInstance}}'