CirclesUBI / circles-api-legacy

User and organization profile service
GNU Affero General Public License v3.0
4 stars 0 forks source link

SNS Endpoint Registration Failing #97

Open shkfnly opened 5 years ago

shkfnly commented 5 years ago

The ability of an user to add their own record into the database is failing in the usersController addOwn function.

After building a user object such as:

{ agreed_to_disclaimer: false,
  username: 'affaaf',
  id: '2a1c5d79-92c7-46ec-bdda-1c4b89599297',
  device_id: '1C283358-5E35-4EE6-83B7-E86E52ABFC48',
  email: 'aflhii@gmail.com',
  name: 'dfafdaf',
  display_name: 'affaaf',
  phone_number: '+13104041586',
  profile_pic_url: 'nopic',
  token_address: '0x67a8d04cbdce460a977b6e7b9dcb3478af6117e8',
  wallet_address: '0xfD0f696248C352A594d5ebAae52A552a0092Fd26' }

The function attempts to call

const endpointArn = await sns.createSNSEndpoint(circlesUser)

This fails with the following error:

{"message":"The security token included in the request is invalid.","level":"error"}
shkfnly commented 5 years ago

The cognito calls are failing for me so I think that I might have the wrong AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY Please send to me when possible