Skip to content

Commit ce513f3

Browse files
author
Fabrizio Mirabito
committed
Use users-api
1 parent 44c9543 commit ce513f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const subscribedTopics = {};
5454
const propertyCallback = {};
5555
const arduinoCloudPort = 8443;
5656
const arduinoCloudHost = 'wss.iot.arduino.cc';
57-
const arduinoAuthURL = 'https://auth.arduino.cc';
57+
const arduinoAuthURL = 'https://api2.arduino.cc';
5858

5959
const getUserId = (apiUrl, token) => fetch(apiUrl, {
6060
method: 'get',
@@ -102,7 +102,7 @@ const connect = options => new Promise((resolve, reject) => {
102102
return reject(new Error('no apiUrl parameter is provided'));
103103
}
104104

105-
return getUserId(`${opts.apiUrl}/v1/users/byID/me`, options.token).then((res) => {
105+
return getUserId(`${opts.apiUrl}/users/v1/users/byID/me`, options.token).then((res) => {
106106
const clientID = `${res.id}:${new Date().getTime()}`;
107107
const client = new Paho.Client(opts.host, opts.port, clientID);
108108
client.topics = {};

0 commit comments

Comments
 (0)