Unable to auth into public rest api

curl --request POST
–url user-api-v2.simplybook.vip/public/auth/token
–header ‘Content-Type: application/json’
–header ‘accept: application/json’
–data ‘{ “company”: {{companyNameString}}, “key”: {{customApiKey}} }’

“Invalid credentials”

I was able to get the token object at user-api.simplybook.vip/login with the same credentials but not in the public rest api equivalent.

curl --request POST
–url user-api.simplybook.vip/login
–header ‘Content-Type: application/json’
–header ‘accept: application/json’
–data ‘{
“jsonrpc”: “2.0”,
“method”: “getToken”,
“params”: [
{{companyNameString}},
{{customApiKey}}
],
“id”: 1
}’

I have turned on smart widgets in custom features as the documentation requested but still not able to auth into rest public api

Is this key requested in public/auth/token method, referring to the api key within custom features menu? or is this some other key?

hi, please follow the documentation here API documentation | SimplyBook.me Online Scheduling

Authentication process. Return auth token info (TokenEntity)
Accepts AdminLoginEntity data as body of request.
Throws BadRequest error in case invalid data was provided with detailed errors per field.

You can use either user password or API User Key for authentication:
- "password": "" - traditional password authentication (requires 2FA and IP verification if enabled)
- "password": "api_user_key_..." - API User Key authentication (bypasses IP verification)

API User Keys can be generated in Settings > API User Keys section.
They are more secure as they allow separate keys per application and don't require sharing your password.

Return Description: Response data

hi, i have tried passing my company and API User Key into /public/auth/token method of public rest api but i am still getting “Invalid credentials”

thanks but i was able to resolve it myself, i just needed to grab the widget api key after i enabled it.