Retrieving an apiOnly user's api key

Hi,

We’re doing some testing on our api integration with our whitelabel account and are unsure how to retrieve a particular user. The user was created as ‘apiOnly’ and their api key wasn’t handled correctly on our side and was subsequently lost. The user had no business access setup yet, otherwise I might have been able to rescue it using a single sign on call.

Wondering about couple of things out of this:

  1. Is there anything we can do on our side reset and/or gain access to the users lost api key?
  2. Is there a way a whitelabel can list users that have been created under the whitelabel, or can you only list users that have some form of business access by querying each businessId individually?

And on a slightly related note about creating users:

  1. Creating a user via the API gives the option of providing a timezone. In order to list the possible timezone values, the KeyPay API Timezone lookup requires the use of a Business Id. As a whitelabel setting up new clients, our new clients do not have a business Id yet for us to perform this lookup on their behalf. Is there a way to lookup timezones in the KeyPay API without a business Id that I’ve overlooked? If not, is it expected we would have a ‘dummy’ business in our whitelabel we use only for the purpose of this kind of lookup on our side?

Thanks for any help,

Joel

Hi Joel,

Hopefully the following will answer your questions!

  1. If you still have the email address for that user, you could use the Recover Password function to set a password for that user (I realise that you don’t set a password for users created via the API). Once you’ve done that, login, and go to the user’s My Account to get (or change!) the API Key.

  2. Not via the API, unfortunately. You can via the web app if you go to the White Label settings, then User Access.

  3. This is a bit silly by us, isn’t it? I’ll look at changing it so that a businessId isn’t required, and that you can get the available time zones by using the api/v2/lookupdata/timezones route. I’ll let you know once that change has been made.

Hi Joel,

The change to add the api/v2/lookupdata/timezones route was deployed overnight. You should be able to use that to access the available time zones without having to use a businessId.

Hi Ken,

Thanks for the suggestions - unfortunately this has not given access to the api key. I’ve reset the user’s password and can login now, however the ‘My Account’ page isn’t showing any API key information - the field is just missing. Is there some property we have to set on the user to have that visible (it was created as an apiOnly user initially)?

Thanks for the api route change - confirmed I’m seeing timezones without a businessId now.

Thanks,

Joel

Hi Joel,

Apologies!! I totally missed your reply. The automated email didn’t send to me, and I’m only seeing your response now.

If you provide me the email address of the user, I can have a look for you. Best not to post it on this public forum, however, so if you email support@yourpayroll.com.au, and ask for me, your request will find me.

Thanks Ken - I think I figured it out in the end. The user has to have permissions to any business before their API key will show. The user I was having trouble with hadn’t yet been assigned business permissions, so they’re API was hidden.

Cheers

Ah great! I’m glad you worked it out, Joel. Let me know if you have any further questions or problems.