Vendor.json email not real email

Hi,

Hitting vendor.json gives me email: “email”:“1149a—–i@n.servicem8.com” which isn’t the email that I used to sign up for account. But when I save a billing email it stores it as the right email.

Is there a way to get the email on the account from the API? how can I use the vendor_email scope if needed?

Thanks

Hi Jack.

In the ServiceM8 API, /vendor.json returns the Vendor record for the account.

The email field on that Vendor record is the primary company email (used for system notifications and as the default sender), so it won’t always match the email you use to log in.

If you’re trying to get the login email for users on the account, /staff.json is the right endpoint. The Staff email field is also the login name.

If you’re saving an Accounts/Billing email address in the Dashboard, that’s separate again: subscription invoices and receipts are sent to the Account Owner’s login email address, and ServiceM8 can also send a copy to an additional Accounts/Billing Email Address. In the API, the Vendor schema also includes email_accounts for the accounts/billing email addresses configured.

For OAuth: the Vendors endpoint requires the vendor scope. If you specifically need access to the account holder’s email address, request the vendor_email scope during OAuth authorisation (scopes are space-separated). If you’re using Serverless OAuth, add vendor_email to your manifest under oauth.scope.

If you request vendor_email and still can’t see the email you’re expecting, email support@servicem8.com with the endpoint you’re calling and a sample (redacted) response so we can check what’s happening.

Thanks,
Cody