code: def access_token_response(self, token, message_id=None):
          
          if (token):
              data = {"accessToken": token,
                      "expiresIn": self.access_token_lifetime}
              if (message_id):
                  data['messageId'] = message_id
          else:
              data = {"error": "client_unauthorized",
                      "description": "No authorization details received"}
          return data
docs: Access token response structure.
  
          Success if token is set, otherwise (None, empty string) give error
          response. If message_id is set then an extra messageId attribute is
          set in the response to handle postMessage() responses.