Django sever can't retrive token

i copy most the code from (GitHub - square/connect-api-examples: Code samples demonstrating the functionality of the Square Connect API) and have all the credentials, it do generate the card form but don’t return token, the sever return: AttributeError: ‘WSGIRequest’ object has no attribute ‘token’

Here is my views.py code

The error message you’re encountering, "AttributeError: 'WSGIRequest' object has no attribute 'token'," suggests that there is an issue with how you are trying to access the token in your code, specifically within a WSGIRequest object. It seems like there might be a mismatch in how the code you copied is expecting to retrieve the token and how it is actually being sent or received in your application.

Were you able to get the example to work without copying to a new project? :slightly_smiling_face: