REST API authentication denied

Hi everyone, im trying to do a smart apps where i can switch on or off a virtual switch when the ping of my cellphone doesnt answer anymore or answer.

I follow that smartthings-rest-api/ at master · bradymholt/smartthings-rest-api · GitHub

I get my access_token

Im trying to get a list of my device with that command :
curl.exe -v -H “Authorization: Bearer XXX” \

but i receive always {“error”:“access_denied”,“error_description”:“Access is denied”}

Do you have any thing where you can help me or maybe another method ?

Im pretty newbi with smartapps that why i took something build. Can you point me to a example page or something like that ? when i simulate my virtual button look like ok

Welcome to the SmartThings Community, @Alexandre_Fraser!

The steps in the repo you shared belong to the Legacy platform (please, check this announcement).
The link @orangebucket shared belongs to the SmartThings API which you can use to send commands to your devices installed on ST.
To send commands (and make other requests), you need to create a Personal Access Token.

For example, this request is used to send a command to the colorControl capability of a device:

You would need to configure the PAT in the authorization tab as shown below:

How are you pinging this device? I mean, is it a program you developed separately?