Skip to content

Creators Auth - wrong AWS region #102

@TheStu

Description

@TheStu

I kept getting a 400 response when using Vacuum::Auth.request

us-west-2
request: curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' -d 'scope=creatorsapi/default&grant_type=client_credentials&client_id=MY_ID&client_secret=MY_SECRET' https://creatorsapi.auth.us-west-2.amazoncognito.com/oauth2/token
result: {"error":"invalid_client"}

us-east-1
request: curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' -d 'scope=creatorsapi/default&grant_type=client_credentials&client_id=MY_ID&client_secret=MY_SECRET' https://creatorsapi.auth.us-east-1.amazoncognito.com/oauth2/token
result: {"access_token":"ACCESS_TOKEN","expires_in":3600,"token_type":"Bearer"}

The AWS region used depends on the marketplace your credentials are from (I'm in North America).

see https://affiliate-program.amazon.com/creatorsapi/docs/en-us/get-started/using-curl and https://github.com/hakanensari/vacuum/blob/main/lib/vacuum/auth.rb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions